mapicgc-gl-js 0.0.60 → 0.0.62
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/mapicgc-gl.js +1 -1
- package/dist/mapicgc-gl.umd.js +1 -1
- package/package.json +1 -1
- package/src/map/Map.js +15 -52
package/dist/mapicgc-gl.js
CHANGED
|
@@ -2574,7 +2574,7 @@ end`};e.events.push(["putFont",function(s){(function(a){var o=a.font,A=a.out,f=a
|
|
|
2574
2574
|
xml:space="preserve">
|
|
2575
2575
|
<image style="stroke: none; stroke-width: 0; stroke-dasharray: none; stroke-linecap: butt; stroke-dashoffset: 0; stroke-linejoin: miter; stroke-miterlimit: 4; fill: rgb(0,0,0); fill-rule: nonzero; opacity: 1;"
|
|
2576
2576
|
xlink:href="${n}" width="${i}" height="${s}"></image>
|
|
2577
|
-
</svg>`,o=document.createElement("a");o.href=`data:application/xml,${encodeURIComponent(a)}`,o.download=t,o.click(),o.remove()}toPixels(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:96;return this.unit===pf.mm&&(t/=25.4),`${t*e}px`}},$te=class extends Wte{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Hh.A4,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:300,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:Ru.PNG,s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:pf.mm,a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:"map",o=arguments.length>6&&arguments[6]!==void 0?arguments[6]:x2;super(e,t,n,i,s,a,"maplibregl-marker",o)}getRenderedMap(e,t){const n=new zE.Map({container:e,style:t,center:this.map.getCenter(),zoom:this.map.getZoom(),bearing:this.map.getBearing(),pitch:this.map.getPitch(),interactive:!1,preserveDrawingBuffer:!0,fadeDuration:0,attributionControl:!1,transformRequest:this.map._requestManager._transformRequestFn});this.map.getTerrain()&&(n.setMaxPitch(85),n.setPitch(this.map.getPitch()));const i=(this.map.style.imageManager||{}).images||[];return Object.keys(i).forEach(s=>{n.addImage(s,i[s].data)}),n}renderMapPost(e){const t=this.map.getTerrain();return t&&e.setTerrain({source:t.source,exaggeration:t.exaggeration}),e}},Xte=class{constructor(e){jn(this,"controlContainer"),jn(this,"exportContainer"),jn(this,"crosshair"),jn(this,"printableArea"),jn(this,"map"),jn(this,"exportButton"),jn(this,"options",{PageSize:Hh.A4,PageOrientation:Bg.Landscape,Format:Ru.PDF,DPI:t2[300],Crosshair:!1,PrintableArea:!1,Local:"en",AllowedSizes:Object.keys(Hh),Filename:"map",markerCirclePaint:x2}),jn(this,"MAPLIB_CSS_PREFIX","maplibregl"),e&&(this.options=Object.assign(this.options,e)),this.onDocumentClick=this.onDocumentClick.bind(this)}getDefaultPosition(){return"top-right"}getTranslation(){const e=this.options.Local??"en";return Xee(e)}onAdd(e){var t;this.map=e,this.controlContainer=document.createElement("div"),this.controlContainer.classList.add(`${this.MAPLIB_CSS_PREFIX}-ctrl`),this.controlContainer.classList.add(`${this.MAPLIB_CSS_PREFIX}-ctrl-group`),this.exportContainer=document.createElement("div"),this.exportContainer.classList.add(`${this.MAPLIB_CSS_PREFIX}-export-list`),this.exportButton=document.createElement("button"),this.exportButton.classList.add(`${this.MAPLIB_CSS_PREFIX}-ctrl-icon`),this.exportButton.classList.add(`${this.MAPLIB_CSS_PREFIX}-export-control`),this.exportButton.type="button",this.exportButton.addEventListener("click",()=>{this.exportButton.style.display="none",this.exportContainer.style.display="block",this.toggleCrosshair(!0),this.togglePrintableArea(!0)}),document.addEventListener("click",this.onDocumentClick),this.controlContainer.appendChild(this.exportButton),this.controlContainer.appendChild(this.exportContainer);const n=document.createElement("TABLE");n.className="print-table";const i={};(t=this.options.AllowedSizes)==null||t.forEach(m=>{Hh[m]&&(i[m]=Hh[m])});const s=this.createSelection(i,this.getTranslation().PageSize,"page-size",this.options.PageSize,(m,v)=>JSON.stringify(m[v]));n.appendChild(s);const a=this.createSelection(Bg,this.getTranslation().PageOrientation,"page-orientation",this.options.PageOrientation,(m,v)=>m[v]);n.appendChild(a);const o=this.createSelection(Ru,this.getTranslation().Format,"format-type",this.options.Format,(m,v)=>m[v]);n.appendChild(o);const A=this.createSelection(t2,this.getTranslation().DPI,"dpi-type",this.options.DPI,(m,v)=>m[v]);n.appendChild(A),this.exportContainer.appendChild(n);const f=document.createElement("button");return f.type="button",f.textContent=this.getTranslation().Generate,f.classList.add("generate-button"),f.addEventListener("click",()=>{const m=document.getElementById("mapbox-gl-export-page-size"),v=document.getElementById("mapbox-gl-export-page-orientation"),x=document.getElementById("mapbox-gl-export-format-type"),C=document.getElementById("mapbox-gl-export-dpi-type"),M=v.value;let U=JSON.parse(m.value);M===Bg.Portrait&&(U=U.reverse()),this.generateMap(e,U,Number(C.value),x.value,pf.mm,this.options.Filename)}),this.exportContainer.appendChild(f),this.controlContainer}generateMap(e,t,n,i,s,a){new $te(e,t,n,i,s,a,this.options.markerCirclePaint).generate()}createSelection(e,t,n,i,s){const a=document.createElement("label");a.textContent=t;const o=document.createElement("select");o.setAttribute("id",`mapbox-gl-export-${n}`),o.style.width="100%",Object.keys(e).forEach(v=>{const x=document.createElement("option");x.setAttribute("value",s(e,v)),x.appendChild(document.createTextNode(v)),x.setAttribute("name",n),i===e[v]&&(x.selected=!0),o.appendChild(x)}),o.addEventListener("change",()=>{this.updatePrintableArea()});const A=document.createElement("TR"),f=document.createElement("TD"),m=document.createElement("TD");return f.appendChild(a),m.appendChild(o),A.appendChild(f),A.appendChild(m),A}onRemove(){!this.controlContainer||!this.controlContainer.parentNode||!this.map||!this.exportButton||(this.exportButton.removeEventListener("click",this.onDocumentClick),this.controlContainer.parentNode.removeChild(this.controlContainer),document.removeEventListener("click",this.onDocumentClick),this.crosshair!==void 0&&(this.crosshair.destroy(),this.crosshair=void 0),this.printableArea!==void 0&&(this.printableArea.destroy(),this.printableArea=void 0),this.map=void 0)}onDocumentClick(e){this.controlContainer&&!this.controlContainer.contains(e.target)&&this.exportContainer&&this.exportButton&&(this.exportContainer.style.display="none",this.exportButton.style.display="block",this.toggleCrosshair(!1),this.togglePrintableArea(!1))}toggleCrosshair(e){this.options.Crosshair===!0&&(e===!1?this.crosshair!==void 0&&(this.crosshair.destroy(),this.crosshair=void 0):(this.crosshair=new kee(this.map),this.crosshair.create()))}togglePrintableArea(e){this.options.PrintableArea===!0&&(e===!1?this.printableArea!==void 0&&(this.printableArea.destroy(),this.printableArea=void 0):(this.printableArea=new Nee(this.map),this.updatePrintableArea()))}updatePrintableArea(){if(this.printableArea===void 0)return;const e=document.getElementById("mapbox-gl-export-page-size"),t=document.getElementById("mapbox-gl-export-page-orientation").value;let n=JSON.parse(e.value);t===Bg.Portrait&&(n=n.reverse()),this.printableArea.updateArea(n[0],n[1])}};var e4=Yte,Jte=Object.prototype.hasOwnProperty;function Yte(){for(var r={},e=0;e<arguments.length;e++){var t=arguments[e];for(var n in t)Jte.call(t,n)&&(r[n]=t[n])}return r}var t4={exports:{}};(function(r,e){(function(){var t={};r.exports=t,t.simpleFilter=function(n,i){return i.filter(function(s){return t.test(n,s)})},t.test=function(n,i){return t.match(n,i)!==null},t.match=function(n,i,s){s=s||{};var a=0,o=[],A=i.length,f=0,m=0,v=s.pre||"",x=s.post||"",C=s.caseSensitive&&i||i.toLowerCase(),M;n=s.caseSensitive&&n||n.toLowerCase();for(var U=0;U<A;U++)M=i[U],C[U]===n[a]?(M=v+M+x,a+=1,m+=1+m):m=0,f+=m,o[o.length]=M;return a===n.length?(f=C===n?1/0:f,{rendered:o.join(""),score:f}):null},t.filter=function(n,i,s){return!i||i.length===0?[]:typeof n!="string"?i:(s=s||{},i.reduce(function(a,o,A,f){var m=o;s.extract&&(m=s.extract(o));var v=t.match(n,m,s);return v!=null&&(a[a.length]={string:v.rendered,score:v.score,index:A,original:o}),a},[]).sort(function(a,o){var A=o.score-a.score;return A||a.index-o.index}))}})()})(t4);var Zte=t4.exports,ha=function(r){return this.component=r,this.items=[],this.active=r.options.noInitialSelection?-1:0,this.wrapper=document.createElement("div"),this.wrapper.className="suggestions-wrapper",this.element=document.createElement("ul"),this.element.className="suggestions",this.wrapper.appendChild(this.element),this.selectingListItem=!1,r.el.parentNode.insertBefore(this.wrapper,r.el.nextSibling),this};ha.prototype.show=function(){this.element.style.display="block"},ha.prototype.hide=function(){this.element.style.display="none"},ha.prototype.add=function(r){this.items.push(r)},ha.prototype.clear=function(){this.items=[],this.active=this.component.options.noInitialSelection?-1:0},ha.prototype.isEmpty=function(){return!this.items.length},ha.prototype.isVisible=function(){return this.element.style.display==="block"},ha.prototype.draw=function(){if(this.element.innerHTML="",this.items.length===0){this.hide();return}for(var r=0;r<this.items.length;r++)this.drawItem(this.items[r],this.active===r);this.show()},ha.prototype.drawItem=function(r,e){var t=document.createElement("li"),n=document.createElement("a");e&&(t.className+=" active"),n.innerHTML=r.string,t.appendChild(n),this.element.appendChild(t),t.addEventListener("mousedown",(function(){this.selectingListItem=!0}).bind(this)),t.addEventListener("mouseup",(function(){this.handleMouseUp.call(this,r)}).bind(this))},ha.prototype.handleMouseUp=function(r){this.selectingListItem=!1,this.component.value(r.original),this.clear(),this.draw()},ha.prototype.move=function(r){this.active=r,this.draw()},ha.prototype.previous=function(){this.move(this.active<=0?this.items.length-1:this.active-1)},ha.prototype.next=function(){this.move(this.active>=this.items.length-1?0:this.active+1)},ha.prototype.drawError=function(r){var e=document.createElement("li");e.innerHTML=r,this.element.appendChild(e),this.show()};var ere=ha,tre=e4,rre=Zte,nre=ere,go=function(r,e,t){return t=t||{},this.options=tre({minLength:2,limit:5,filter:!0,hideOnBlur:!0,noInitialSelection:!0},t),this.el=r,this.data=e||[],this.list=new nre(this),this.query="",this.selected=null,this.list.draw(),this.el.addEventListener("keyup",(function(n){this.handleKeyUp(n.keyCode,n)}).bind(this),!1),this.el.addEventListener("keydown",(function(n){this.handleKeyDown(n)}).bind(this)),this.el.addEventListener("focus",(function(){this.handleFocus()}).bind(this)),this.el.addEventListener("blur",(function(){this.handleBlur()}).bind(this)),this.el.addEventListener("paste",(function(n){this.handlePaste(n)}).bind(this)),this.render=this.options.render?this.options.render.bind(this):this.render.bind(this),this.getItemValue=this.options.getItemValue?this.options.getItemValue.bind(this):this.getItemValue.bind(this),this};go.prototype.handleKeyUp=function(r,e){if(!(r===40||r===38||r===27||r===9)){if(r===13){this.list.items[this.list.active]&&(this.list.handleMouseUp(this.list.items[this.list.active]),e.stopPropagation());return}this.handleInputChange(this.el.value)}},go.prototype.handleKeyDown=function(r){switch(r.keyCode){case 13:this.list.active>=0&&(this.list.selectingListItem=!0);break;case 9:this.list.isEmpty()||(this.list.isVisible()&&r.preventDefault(),this.value(this.list.active>=0?this.list.items[this.list.active].original:null),this.list.hide());break;case 27:this.list.isEmpty()||this.list.hide();break;case 38:this.list.previous();break;case 40:this.list.next();break}},go.prototype.handleBlur=function(){!this.list.selectingListItem&&this.options.hideOnBlur&&this.list.hide()},go.prototype.handlePaste=function(r){if(r.clipboardData)this.handleInputChange(r.clipboardData.getData("Text"));else{var e=this;setTimeout(function(){e.handleInputChange(r.target.value)},100)}},go.prototype.handleInputChange=function(r){if(this.query=this.normalize(r),this.list.clear(),this.query.length<this.options.minLength){this.list.draw();return}this.getCandidates((function(e){for(var t=0;t<e.length&&(this.list.add(e[t]),t!==this.options.limit-1);t++);this.list.draw()}).bind(this))},go.prototype.handleFocus=function(){this.list.isEmpty()||this.list.show(),this.list.selectingListItem=!1},go.prototype.update=function(r){this.data=r,this.handleKeyUp()},go.prototype.clear=function(){this.data=[],this.list.clear()},go.prototype.normalize=function(r){return r=r.toLowerCase(),r},go.prototype.match=function(r,e){return r.indexOf(e)>-1},go.prototype.value=function(r){if(this.selected=r,this.el.value=this.getItemValue(r||{place_name:this.query}),document.createEvent){var e=document.createEvent("HTMLEvents");e.initEvent("change",!0,!1),this.el.dispatchEvent(e)}else this.el.fireEvent("onchange")},go.prototype.getCandidates=function(r){var e={pre:"<strong>",post:"</strong>",extract:(function(n){return this.getItemValue(n)}).bind(this)},t;this.options.filter?(t=rre.filter(this.query,this.data,e),t=t.map((function(n){return{original:n.original,string:this.render(n.original,n.string)}}).bind(this))):t=this.data.map((function(n){var i=this.render(n);return{original:n,string:i}}).bind(this)),r(t)},go.prototype.getItemValue=function(r){return r},go.prototype.render=function(r,e){if(e)return e;for(var t=r.original?this.getItemValue(r.original):this.getItemValue(r),n=this.normalize(t),i=n.lastIndexOf(this.query);i>-1;){var s=i+this.query.length;t=t.slice(0,i)+"<strong>"+t.slice(i,s)+"</strong>"+t.slice(s),i=n.slice(0,i).lastIndexOf(this.query)}return t},go.prototype.renderError=function(r){this.list.drawError(r)};var ire=go,r4=ire,sre=r4;typeof window<"u"&&(window.Suggestions=r4);var ore="Expected a function",n4=NaN,are="[object Symbol]",cre=/^\s+|\s+$/g,lre=/^[-+]0x[0-9a-f]+$/i,ure=/^0b[01]+$/i,Are=/^0o[0-7]+$/i,hre=parseInt,dre=typeof Fd=="object"&&Fd&&Fd.Object===Object&&Fd,fre=typeof self=="object"&&self&&self.Object===Object&&self,pre=dre||fre||Function("return this")(),gre=Object.prototype,mre=gre.toString,yre=Math.max,_re=Math.min,B2=function(){return pre.Date.now()};function vre(r,e,t){var n,i,s,a,o,A,f=0,m=!1,v=!1,x=!0;if(typeof r!="function")throw new TypeError(ore);e=i4(e)||0,C2(t)&&(m=!!t.leading,v="maxWait"in t,s=v?yre(i4(t.maxWait)||0,e):s,x="trailing"in t?!!t.trailing:x);function C(ge){var ye=n,fe=i;return n=i=void 0,f=ge,a=r.apply(fe,ye),a}function M(ge){return f=ge,o=setTimeout(N,e),m?C(ge):a}function U(ge){var ye=ge-A,fe=ge-f,Oe=e-ye;return v?_re(Oe,s-fe):Oe}function Q(ge){var ye=ge-A,fe=ge-f;return A===void 0||ye>=e||ye<0||v&&fe>=s}function N(){var ge=B2();if(Q(ge))return q(ge);o=setTimeout(N,U(ge))}function q(ge){return o=void 0,x&&n?C(ge):(n=i=void 0,a)}function Y(){o!==void 0&&clearTimeout(o),f=0,n=A=i=o=void 0}function te(){return o===void 0?a:q(B2())}function pe(){var ge=B2(),ye=Q(ge);if(n=arguments,i=this,A=ge,ye){if(o===void 0)return M(A);if(v)return o=setTimeout(N,e),C(A)}return o===void 0&&(o=setTimeout(N,e)),a}return pe.cancel=Y,pe.flush=te,pe}function C2(r){var e=typeof r;return!!r&&(e=="object"||e=="function")}function bre(r){return!!r&&typeof r=="object"}function wre(r){return typeof r=="symbol"||bre(r)&&mre.call(r)==are}function i4(r){if(typeof r=="number")return r;if(wre(r))return n4;if(C2(r)){var e=typeof r.valueOf=="function"?r.valueOf():r;r=C2(e)?e+"":e}if(typeof r!="string")return r===0?r:+r;r=r.replace(cre,"");var t=ure.test(r);return t||Are.test(r)?hre(r.slice(2),t?2:8):lre.test(r)?n4:+r}var xre=vre,E2={exports:{}},Cf=typeof Reflect=="object"?Reflect:null,s4=Cf&&typeof Cf.apply=="function"?Cf.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)},by;Cf&&typeof Cf.ownKeys=="function"?by=Cf.ownKeys:Object.getOwnPropertySymbols?by=function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:by=function(e){return Object.getOwnPropertyNames(e)};function Bre(r){console&&console.warn&&console.warn(r)}var o4=Number.isNaN||function(e){return e!==e};function ni(){ni.init.call(this)}E2.exports=ni,E2.exports.once=Tre,ni.EventEmitter=ni,ni.prototype._events=void 0,ni.prototype._eventsCount=0,ni.prototype._maxListeners=void 0;var a4=10;function wy(r){if(typeof r!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof r)}Object.defineProperty(ni,"defaultMaxListeners",{enumerable:!0,get:function(){return a4},set:function(r){if(typeof r!="number"||r<0||o4(r))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+r+".");a4=r}}),ni.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},ni.prototype.setMaxListeners=function(e){if(typeof e!="number"||e<0||o4(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this};function c4(r){return r._maxListeners===void 0?ni.defaultMaxListeners:r._maxListeners}ni.prototype.getMaxListeners=function(){return c4(this)},ni.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var i=e==="error",s=this._events;if(s!==void 0)i=i&&s.error===void 0;else if(!i)return!1;if(i){var a;if(t.length>0&&(a=t[0]),a instanceof Error)throw a;var o=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw o.context=a,o}var A=s[e];if(A===void 0)return!1;if(typeof A=="function")s4(A,this,t);else for(var f=A.length,m=d4(A,f),n=0;n<f;++n)s4(m[n],this,t);return!0};function l4(r,e,t,n){var i,s,a;if(wy(t),s=r._events,s===void 0?(s=r._events=Object.create(null),r._eventsCount=0):(s.newListener!==void 0&&(r.emit("newListener",e,t.listener?t.listener:t),s=r._events),a=s[e]),a===void 0)a=s[e]=t,++r._eventsCount;else if(typeof a=="function"?a=s[e]=n?[t,a]:[a,t]:n?a.unshift(t):a.push(t),i=c4(r),i>0&&a.length>i&&!a.warned){a.warned=!0;var o=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");o.name="MaxListenersExceededWarning",o.emitter=r,o.type=e,o.count=a.length,Bre(o)}return r}ni.prototype.addListener=function(e,t){return l4(this,e,t,!1)},ni.prototype.on=ni.prototype.addListener,ni.prototype.prependListener=function(e,t){return l4(this,e,t,!0)};function Cre(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function u4(r,e,t){var n={fired:!1,wrapFn:void 0,target:r,type:e,listener:t},i=Cre.bind(n);return i.listener=t,n.wrapFn=i,i}ni.prototype.once=function(e,t){return wy(t),this.on(e,u4(this,e,t)),this},ni.prototype.prependOnceListener=function(e,t){return wy(t),this.prependListener(e,u4(this,e,t)),this},ni.prototype.removeListener=function(e,t){var n,i,s,a,o;if(wy(t),i=this._events,i===void 0)return this;if(n=i[e],n===void 0)return this;if(n===t||n.listener===t)--this._eventsCount===0?this._events=Object.create(null):(delete i[e],i.removeListener&&this.emit("removeListener",e,n.listener||t));else if(typeof n!="function"){for(s=-1,a=n.length-1;a>=0;a--)if(n[a]===t||n[a].listener===t){o=n[a].listener,s=a;break}if(s<0)return this;s===0?n.shift():Ere(n,s),n.length===1&&(i[e]=n[0]),i.removeListener!==void 0&&this.emit("removeListener",e,o||t)}return this},ni.prototype.off=ni.prototype.removeListener,ni.prototype.removeAllListeners=function(e){var t,n,i;if(n=this._events,n===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[e]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[e]),this;if(arguments.length===0){var s=Object.keys(n),a;for(i=0;i<s.length;++i)a=s[i],a!=="removeListener"&&this.removeAllListeners(a);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(t=n[e],typeof t=="function")this.removeListener(e,t);else if(t!==void 0)for(i=t.length-1;i>=0;i--)this.removeListener(e,t[i]);return this};function A4(r,e,t){var n=r._events;if(n===void 0)return[];var i=n[e];return i===void 0?[]:typeof i=="function"?t?[i.listener||i]:[i]:t?Sre(i):d4(i,i.length)}ni.prototype.listeners=function(e){return A4(this,e,!0)},ni.prototype.rawListeners=function(e){return A4(this,e,!1)},ni.listenerCount=function(r,e){return typeof r.listenerCount=="function"?r.listenerCount(e):h4.call(r,e)},ni.prototype.listenerCount=h4;function h4(r){var e=this._events;if(e!==void 0){var t=e[r];if(typeof t=="function")return 1;if(t!==void 0)return t.length}return 0}ni.prototype.eventNames=function(){return this._eventsCount>0?by(this._events):[]};function d4(r,e){for(var t=new Array(e),n=0;n<e;++n)t[n]=r[n];return t}function Ere(r,e){for(;e+1<r.length;e++)r[e]=r[e+1];r.pop()}function Sre(r){for(var e=new Array(r.length),t=0;t<e.length;++t)e[t]=r[t].listener||r[t];return e}function Tre(r,e){return new Promise(function(t,n){function i(a){r.removeListener(e,s),n(a)}function s(){typeof r.removeListener=="function"&&r.removeListener("error",i),t([].slice.call(arguments))}f4(r,e,s,{once:!0}),e!=="error"&&Ire(r,i,{once:!0})})}function Ire(r,e,t){typeof r.on=="function"&&f4(r,"error",e,t)}function f4(r,e,t,n){if(typeof r.on=="function")n.once?r.once(e,t):r.on(e,t);else if(typeof r.addEventListener=="function")r.addEventListener(e,function i(s){n.once&&r.removeEventListener(e,i),t(s)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof r)}var p4=E2.exports,Lre={fr:{name:"France",bbox:[[-4.59235,41.380007],[9.560016,51.148506]]},us:{name:"United States",bbox:[[-171.791111,18.91619],[-66.96466,71.357764]]},ru:{name:"Russia",bbox:[[19.66064,41.151416],[190.10042,81.2504]]},ca:{name:"Canada",bbox:[[-140.99778,41.675105],[-52.648099,83.23324]]}},Fre={de:"Suche",it:"Ricerca",en:"Search",nl:"Zoeken",fr:"Chercher",ca:"Cerca",he:"לחפש",ja:"サーチ",lv:"Meklēt",pt:"Procurar",sr:"Претрага",zh:"搜索",cs:"Vyhledávání",hu:"Keresés",ka:"ძიება",nb:"Søke",sk:"Vyhľadávanie",th:"ค้นหา",fi:"Hae",is:"Leita",ko:"수색",pl:"Szukaj",sl:"Iskanje",fa:"جستجو",ru:"Поиск"},Mre={placeholder:Fre},g4={exports:{}};(function(r){(function(e,t,n){r.exports?r.exports=n():e[t]=n()})(Fd,"subtag",function(){var e="",t=/^([a-zA-Z]{2,3})(?:[_-]+([a-zA-Z]{3})(?=$|[_-]+))?(?:[_-]+([a-zA-Z]{4})(?=$|[_-]+))?(?:[_-]+([a-zA-Z]{2}|[0-9]{3})(?=$|[_-]+))?/;function n(A){return A.match(t)||[]}function i(A){return n(A).filter(function(f,m){return f&&m})}function s(A){return A=n(A),{language:A[1]||e,extlang:A[2]||e,script:A[3]||e,region:A[4]||e}}function a(A,f,m){Object.defineProperty(A,f,{value:m,enumerable:!0})}function o(A,f,m){function v(x){return n(x)[A]||e}a(v,"pattern",f),a(s,m,v)}return o(1,/^[a-zA-Z]{2,3}$/,"language"),o(2,/^[a-zA-Z]{3}$/,"extlang"),o(3,/^[a-zA-Z]{4}$/,"script"),o(4,/^[a-zA-Z]{2}$|^[0-9]{3}$/,"region"),a(s,"split",i),s})})(g4);var Pre=g4.exports,Ure=sre,Rre=xre,Da=e4,Ore=p4.EventEmitter,m4=Lre,Dre=Mre,kre=Pre;function y4(r,e){this._eventEmitter=new Ore,this.options=Da({},this.options,e),this.inputString="",this.fresh=!0,this.lastSelected=null,this.geocoderApi=r}y4.prototype={options:{zoom:16,flyTo:!0,trackProximity:!0,showResultsWhileTyping:!1,minLength:2,reverseGeocode:!1,limit:5,enableEventLogging:!0,marker:!0,popup:!1,maplibregl:null,collapsed:!1,clearAndBlurOnEsc:!1,clearOnBlur:!1,getItemValue:function(r){return r.text!==void 0?r.text:r.place_name},render:function(r){if(r.geometry){var o=r.place_name.split(",");return'<div class="mapboxgl-ctrl-geocoder--result maplibregl-ctrl-geocoder--result"><svg class="mapboxgl-ctrl-geocoder--result-icon maplibre-ctrl-geocoder--result-icon" viewBox="0 0 24 32" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12 0C5.36571 0 0 5.38676 0 12.0471C0 21.0824 12 32 12 32C12 32 24 21.0824 24 12.0471C24 5.38676 18.6343 0 12 0ZM12 16.3496C9.63428 16.3496 7.71429 14.4221 7.71429 12.0471C7.71429 9.67207 9.63428 7.74454 12 7.74454C14.3657 7.74454 16.2857 9.67207 16.2857 12.0471C16.2857 14.4221 14.3657 16.3496 12 16.3496Z" fill="#687078"/></svg><div><div class="mapboxgl-ctrl-geocoder--result-title maplibregl-ctrl-geocoder--result-title">'+o[0]+'</div><div class="mapboxgl-ctrl-geocoder--result-address maplibregl-ctrl-geocoder--result-address">'+o.splice(1,o.length).join(",")+"</div></div></div>"}else{var e=r.text,t=e.toLowerCase().indexOf(this.query.toLowerCase()),n=this.query.length,i=e.substring(0,t),s=e.substring(t,t+n),a=e.substring(t+n);return'<div class="mapboxgl-ctrl-geocoder--suggestion maplibregl-ctrl-geocoder--suggestion"><svg class="mapboxgl-ctrl-geocoder--suggestion-icon maplibre-ctrl-geocoder--suggestion-icon" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg"><path d="M22.8702 20.1258H21.4248L20.9125 19.6318C22.7055 17.546 23.785 14.8382 23.785 11.8925C23.785 5.32419 18.4608 0 11.8925 0C5.32419 0 0 5.32419 0 11.8925C0 18.4608 5.32419 23.785 11.8925 23.785C14.8382 23.785 17.546 22.7055 19.6318 20.9125L20.1258 21.4248V22.8702L29.2739 32L32 29.2739L22.8702 20.1258ZM11.8925 20.1258C7.33676 20.1258 3.65923 16.4483 3.65923 11.8925C3.65923 7.33676 7.33676 3.65923 11.8925 3.65923C16.4483 3.65923 20.1258 7.33676 20.1258 11.8925C20.1258 16.4483 16.4483 20.1258 11.8925 20.1258Z" fill="#687078"/></svg><div class="mapboxgl-ctrl-geocoder--suggestion-info maplibregl-ctrl-geocoder--suggestion-info"><div class="mapboxgl-ctrl-geocoder--suggestion-title maplibregl-ctrl-geocoder--suggestion-title">'+i+'<span class="mapboxgl-ctrl-geocoder--suggestion-match maplibregl-ctrl-geocoder--suggestion-match">'+s+"</span>"+a+"</div></div></div>"}},popupRender:function(r){var e=r.place_name.split(",");return'<div class="mapboxgl-ctrl-geocoder--suggestion maplibre-ctrl-geocoder--suggestion popup-suggestion"><div class="mapboxgl-ctrl-geocoder--suggestion-title maplibre-ctrl-geocoder--suggestion-title popup-suggestion-title">'+e[0]+'</div><div class="mapboxgl-ctrl-geocoder--suggestion-address maplibre-ctrl-geocoder--suggestion-address popup-suggestion-address">'+e.splice(1,e.length).join(",")+"</div></div>"},showResultMarkers:!0,debounceSearch:200},addTo:function(r){function e(n,i){if(!document.body.contains(i))throw new Error("Element provided to #addTo() exists, but is not in the DOM");var s=n.onAdd();i.appendChild(s)}if(r._controlContainer)r.addControl(this);else if(r instanceof HTMLElement)e(this,r);else if(typeof r=="string"){var t=document.querySelectorAll(r);if(t.length===0)throw new Error("Element ",r,"not found.");if(t.length>1)throw new Error("Geocoder can only be added to a single html element");e(this,t[0])}else throw new Error("Error: addTo must be a maplibre-gl-js map, an html element, or a CSS selector query for a single html element")},onAdd:function(r){if(r&&typeof r!="string"&&(this._map=r),this.setLanguage(),this.options.localGeocoderOnly&&!this.options.localGeocoder)throw new Error("A localGeocoder function must be specified to use localGeocoderOnly mode");this._onChange=this._onChange.bind(this),this._onKeyDown=this._onKeyDown.bind(this),this._onPaste=this._onPaste.bind(this),this._onBlur=this._onBlur.bind(this),this._showButton=this._showButton.bind(this),this._hideButton=this._hideButton.bind(this),this._onQueryResult=this._onQueryResult.bind(this),this.clear=this.clear.bind(this),this._updateProximity=this._updateProximity.bind(this),this._collapse=this._collapse.bind(this),this._unCollapse=this._unCollapse.bind(this),this._clear=this._clear.bind(this),this._clearOnBlur=this._clearOnBlur.bind(this);var e=this.container=document.createElement("div");e.className="mapboxgl-ctrl-geocoder mapboxgl-ctrl maplibregl-ctrl-geocoder maplibregl-ctrl";var t=this.createIcon("search",'<path d="M7.4 2.5c-2.7 0-4.9 2.2-4.9 4.9s2.2 4.9 4.9 4.9c1 0 1.8-.2 2.5-.8l3.7 3.7c.2.2.4.3.8.3.7 0 1.1-.4 1.1-1.1 0-.3-.1-.5-.3-.8L11.4 10c.4-.8.8-1.6.8-2.5.1-2.8-2.1-5-4.8-5zm0 1.6c1.8 0 3.2 1.4 3.2 3.2s-1.4 3.2-3.2 3.2-3.3-1.3-3.3-3.1 1.4-3.3 3.3-3.3z"/>');this._inputEl=document.createElement("input"),this._inputEl.type="text",this._inputEl.className="mapboxgl-ctrl-geocoder--input maplibregl-ctrl-geocoder--input",this.setPlaceholder(),this.options.collapsed&&(this._collapse(),this.container.addEventListener("mouseenter",this._unCollapse),this.container.addEventListener("mouseleave",this._collapse),this._inputEl.addEventListener("focus",this._unCollapse)),(this.options.collapsed||this.options.clearOnBlur)&&this._inputEl.addEventListener("blur",this._onBlur),this._inputEl.addEventListener("keydown",Rre(this._onKeyDown,this.options.debounceSearch)),this._inputEl.addEventListener("paste",this._onPaste),this._inputEl.addEventListener("change",this._onChange),this.container.addEventListener("mouseenter",this._showButton),this.container.addEventListener("mouseleave",this._hideButton);var n=document.createElement("div");n.classList.add("mapboxgl-ctrl-geocoder--pin-right","maplibregl-ctrl-geocoder--pin-right"),this._clearEl=document.createElement("button"),this._clearEl.setAttribute("aria-label","Clear"),this._clearEl.addEventListener("click",this.clear),this._clearEl.className="mapboxgl-ctrl-geocoder--button maplibregl-ctrl-geocoder--button";var i=this.createIcon("close",'<path d="M3.8 2.5c-.6 0-1.3.7-1.3 1.3 0 .3.2.7.5.8L7.2 9 3 13.2c-.3.3-.5.7-.5 1 0 .6.7 1.3 1.3 1.3.3 0 .7-.2 1-.5L9 10.8l4.2 4.2c.2.3.7.3 1 .3.6 0 1.3-.7 1.3-1.3 0-.3-.2-.7-.3-1l-4.4-4L15 4.6c.3-.2.5-.5.5-.8 0-.7-.7-1.3-1.3-1.3-.3 0-.7.2-1 .3L9 7.1 4.8 2.8c-.3-.1-.7-.3-1-.3z"/>');return this._clearEl.appendChild(i),this._loadingEl=this.createIcon("loading",'<path fill="#333" d="M4.4 4.4l.8.8c2.1-2.1 5.5-2.1 7.6 0l.8-.8c-2.5-2.5-6.7-2.5-9.2 0z"/><path opacity=".1" d="M12.8 12.9c-2.1 2.1-5.5 2.1-7.6 0-2.1-2.1-2.1-5.5 0-7.7l-.8-.8c-2.5 2.5-2.5 6.7 0 9.2s6.6 2.5 9.2 0 2.5-6.6 0-9.2l-.8.8c2.2 2.1 2.2 5.6 0 7.7z"/>'),n.appendChild(this._clearEl),n.appendChild(this._loadingEl),e.appendChild(t),e.appendChild(this._inputEl),e.appendChild(n),this._typeahead=new Ure(this._inputEl,[],{filter:!1,minLength:this.options.minLength,limit:this.options.limit,noInitialSelection:!0}),this.setRenderFunction(this.options.render),this._typeahead.getItemValue=this.options.getItemValue,this.mapMarker=null,this.resultMarkers=[],this._handleMarker=this._handleMarker.bind(this),this._handleResultMarkers=this._handleResultMarkers.bind(this),this._map&&(this.options.trackProximity&&(this._updateProximity(),this._map.on("moveend",this._updateProximity)),this._maplibregl=this.options.maplibregl,!this._maplibregl&&this.options.marker&&(console.error("No maplibregl detected in options. Map markers are disabled. Please set options.maplibregl."),this.options.marker=!1)),e},createIcon:function(r,e){var t=document.createElementNS("http://www.w3.org/2000/svg","svg");if(t.setAttribute("class","mapboxgl-ctrl-geocoder--icon mapboxgl-ctrl-geocoder--icon-"+r+" maplibregl-ctrl-geocoder--icon maplibregl-ctrl-geocoder--icon-"+r),t.setAttribute("viewBox","0 0 18 18"),t.setAttribute("xml:space","preserve"),t.setAttribute("width",18),t.setAttribute("height",18),"innerHTML"in t)t.innerHTML=e;else{var n=document.createElement("div");n.innerHTML="<svg>"+e.valueOf().toString()+"</svg>";var i=n.firstChild,s=i.firstChild;t.appendChild(s)}return t},onRemove:function(){return this.container.parentNode.removeChild(this.container),this.options.trackProximity&&this._map&&this._map.off("moveend",this._updateProximity),this._removeMarker(),this._map=null,this},_onPaste:function(r){var e=(r.clipboardData||window.clipboardData).getData("text");e.length>=this.options.minLength&&this.options.showResultsWhileTyping&&this._geocode(e)},_onKeyDown:function(r){var e=27,t=9;if(r.keyCode===e&&this.options.clearAndBlurOnEsc)return this._clear(r),this._inputEl.blur();var n=r.target&&r.target.shadowRoot?r.target.shadowRoot.activeElement:r.target,i=n?n.value:"";if(!i)return this.fresh=!0,r.keyCode!==t&&this.clear(r),this._clearEl.style.display="none";if(!(r.metaKey||[t,e,37,39,38,40].indexOf(r.keyCode)!==-1)){if(r.keyCode===13)if(!this.options.showResultsWhileTyping)this._typeahead.selected||this._geocode(n.value);else{this._typeahead.selected==null&&this.geocoderApi.getSuggestions?this._geocode(n.value,!0):this._typeahead.selected==null&&this.options.showResultMarkers&&this._fitBoundsForMarkers();return}n.value.length>=this.options.minLength&&this.options.showResultsWhileTyping&&this._geocode(n.value)}},_showButton:function(){this._inputEl.value.length>0&&(this._clearEl.style.display="block")},_hideButton:function(){this._typeahead.selected&&(this._clearEl.style.display="none")},_onBlur:function(r){this.options.clearOnBlur&&this._clearOnBlur(r),this.options.collapsed&&this._collapse()},_onChange:function(){var r=this._typeahead.selected;if(r&&!r.geometry)r.placeId?this._geocode(r.placeId,!0,!0):this._geocode(r.text,!0);else if(r&&JSON.stringify(r)!==this.lastSelected){if(this._clearEl.style.display="none",this.options.flyTo){var e;if(this._removeResultMarkers(),r.properties&&m4[r.properties.short_code])e=Da({},this.options.flyTo),this._map&&this._map.fitBounds(m4[r.properties.short_code].bbox,e);else if(r.bbox){var t=r.bbox;e=Da({},this.options.flyTo),this._map&&this._map.fitBounds([[t[0],t[1]],[t[2],t[3]]],e)}else{var n={zoom:this.options.zoom};e=Da({},n,this.options.flyTo),r.center?e.center=r.center:r.geometry&&r.geometry.type&&r.geometry.type==="Point"&&r.geometry.coordinates&&(e.center=r.geometry.coordinates),this._map&&this._map.flyTo(e)}}this.options.marker&&this._maplibregl&&this._handleMarker(r),this._inputEl.focus(),this._inputEl.scrollLeft=0,this._inputEl.setSelectionRange(0,0),this.lastSelected=JSON.stringify(r),this._typeahead.selected=null,this._eventEmitter.emit("result",{result:r})}},_getConfigForRequest:function(){var r=["bbox","limit","proximity","countries","types","language","reverseMode"],e=this,t=r.reduce(function(n,i){return e.options[i]&&(["countries","types","language"].indexOf(i)>-1?n[i]=e.options[i].split(/[\s,]+/):n[i]=e.options[i],i==="proximity"&&e.options[i]&&typeof e.options[i].longitude=="number"&&typeof e.options[i].latitude=="number"&&(n[i]=[e.options[i].longitude,e.options[i].latitude])),n},{});return t},_geocode:function(r,e,t){this._loadingEl.style.display="block",this._eventEmitter.emit("loading",{query:r}),this.inputString=r;var n=null,i=this._getConfigForRequest(),s;if(this.options.localGeocoderOnly)s=Promise.resolve();else if(this.options.reverseGeocode&&/(-?\d+\.?\d*)[, ]+(-?\d+\.?\d*)[ ]*$/.test(r)){var a=r.split(/[\s(,)?]+/).map(function(f){return parseFloat(f,10)}).reverse();i.types&&i.types[0],i=Da(i,{query:a,limit:1}),"proximity"in i&&delete i.proximity,s=this.geocoderApi.reverseGeocode(i)}else i=Da(i,{query:r}),this.geocoderApi.getSuggestions?e?this.geocoderApi.searchByPlaceId&&t?s=this.geocoderApi.searchByPlaceId(i):s=this.geocoderApi.forwardGeocode(i):s=this.geocoderApi.getSuggestions(i):s=this.geocoderApi.forwardGeocode(i);var o=[];this.options.localGeocoder&&(o=this.options.localGeocoder(r),o||(o=[]));var A=[];return s.catch((function(f){n=f}).bind(this)).then((function(f){this._loadingEl.style.display="none";var m={};return f?m=f:m={type:"FeatureCollection",features:[]},m.config=i,this.fresh&&(this.fresh=!1),m.features=m.features?o.concat(m.features):o,this.options.externalGeocoder?(A=this.options.externalGeocoder(r,m.features,i)||[],A.then(function(v){return m.features=m.features?v.concat(m.features):v,m},function(){return m})):m}).bind(this)).then((function(f){if(n)throw n;this.options.filter&&f.features.length&&(f.features=f.features.filter(this.options.filter));var m=[];f.suggestions?m=f.suggestions:f.place?m=[f.place]:m=f.features,m.length?(this._clearEl.style.display="block",this._typeahead.update(m),(!this.options.showResultsWhileTyping||e)&&this.options.showResultMarkers&&(f.features.length>0||f.place)&&this._fitBoundsForMarkers(),this._eventEmitter.emit("results",f)):(this._clearEl.style.display="none",this._typeahead.selected=null,this._renderNoResults(),this._eventEmitter.emit("results",f))}).bind(this)).catch((function(f){this._loadingEl.style.display="none",o.length&&this.options.localGeocoder||A.length&&this.options.externalGeocoder?(this._clearEl.style.display="block",this._typeahead.update(o)):(this._clearEl.style.display="none",this._typeahead.selected=null,this._renderError()),this._eventEmitter.emit("results",{features:o}),this._eventEmitter.emit("error",{error:f})}).bind(this)),s},_clear:function(r){r&&r.preventDefault(),this._inputEl.value="",this._typeahead.selected=null,this._typeahead.clear(),this._onChange(),this._clearEl.style.display="none",this._removeMarker(),this._removeResultMarkers(),this.lastSelected=null,this._eventEmitter.emit("clear"),this.fresh=!0},clear:function(r){this._clear(r),this._inputEl.focus()},_clearOnBlur:function(r){var e=this;r.relatedTarget&&e._clear(r)},_onQueryResult:function(r){var e=r;if(e.features.length){var t=e.features[0];this._typeahead.selected=t,this._inputEl.value=t.place_name,this._onChange()}},_updateProximity:function(){if(this._map)if(this._map.getZoom()>9){var r=this._map.getCenter().wrap();this.setProximity({longitude:r.lng,latitude:r.lat})}else this.setProximity(null)},_collapse:function(){!this._inputEl.value&&this._inputEl!==document.activeElement&&this.container.classList.add("mapboxgl-ctrl-geocoder--collapsed","maplibregl-ctrl-geocoder--collapsed")},_unCollapse:function(){this.container.classList.remove("mapboxgl-ctrl-geocoder--collapsed","maplibregl-ctrl-geocoder--collapsed")},query:function(r){return this._geocode(r).then(this._onQueryResult),this},_renderError:function(){var r="<div class='mapbox-gl-geocoder--error maplibre-gl-geocoder--error'>There was an error reaching the server</div>";this._renderMessage(r)},_renderNoResults:function(){var r="<div class='mapbox-gl-geocoder--error mapbox-gl-geocoder--no-results maplibre-gl-geocoder--error maplibre-gl-geocoder--no-results'>No results found</div>";this._renderMessage(r)},_renderMessage:function(r){this._typeahead.update([]),this._typeahead.selected=null,this._typeahead.clear(),this._typeahead.renderError(r)},_getPlaceholderText:function(){if(this.options.placeholder)return this.options.placeholder;if(this.options.language){var r=this.options.language.split(",")[0],e=kre.language(r),t=Dre.placeholder[e];if(t)return t}return"Search"},_fitBoundsForMarkers:function(){if(!(this._typeahead.data.length<1)){var r=this._typeahead.data.filter(function(i){return typeof i!="string"}).slice(0,this.options.limit);if(this._clearEl.style.display="none",this.options.flyTo&&this._maplibregl&&this._map){var e={padding:100},t=Da({},e,this.options.flyTo),n=new this._maplibregl.LngLatBounds;r.forEach(function(i){n.extend(i.geometry.coordinates)}),this._map.fitBounds(n.toArray(),t)}return r.length>0&&this._maplibregl&&this._handleResultMarkers(r),this}},setInput:function(r){return this._inputEl.value=r,this._typeahead.selected=null,this._typeahead.clear(),r.length>=this.options.minLength&&this.options.showResultsWhileTyping&&this._geocode(r),this},setProximity:function(r){return this.options.proximity=r,this},getProximity:function(){return this.options.proximity},setRenderFunction:function(r){return r&&typeof r=="function"&&(this._typeahead.render=r),this},getRenderFunction:function(){return this._typeahead.render},setLanguage:function(r){var e=navigator.language||navigator.userLanguage||navigator.browserLanguage;return this.options.language=r||this.options.language||e,this},getLanguage:function(){return this.options.language},getZoom:function(){return this.options.zoom},setZoom:function(r){return this.options.zoom=r,this},getFlyTo:function(){return this.options.flyTo},setFlyTo:function(r){return this.options.flyTo=r,this},getPlaceholder:function(){return this.options.placeholder},setPlaceholder:function(r){return this.placeholder=r||this._getPlaceholderText(),this._inputEl.placeholder=this.placeholder,this._inputEl.setAttribute("aria-label",this.placeholder),this},getBbox:function(){return this.options.bbox},setBbox:function(r){return this.options.bbox=r,this},getCountries:function(){return this.options.countries},setCountries:function(r){return this.options.countries=r,this},getTypes:function(){return this.options.types},setTypes:function(r){return this.options.types=r,this},getMinLength:function(){return this.options.minLength},setMinLength:function(r){return this.options.minLength=r,this._typeahead&&(this._typeahead.options.minLength=r),this},getLimit:function(){return this.options.limit},setLimit:function(r){return this.options.limit=r,this._typeahead&&(this._typeahead.options.limit=r),this},getFilter:function(){return this.options.filter},setFilter:function(r){return this.options.filter=r,this},setGeocoderApi:function(r){return this.geocoderApi=r,this},getGeocoderApi:function(){return this.geocoderApi},_handleMarker:function(r){if(this._map){this._removeMarker();var e={color:"#4668F2"},t=Da({},e,this.options.marker);this.mapMarker=new this._maplibregl.Marker(t);var n;if(this.options.popup){var i={},s=Da({},i,this.options.popup);n=new this._maplibregl.Popup(s).setHTML(this.options.popupRender(r))}return r.center?(this.mapMarker.setLngLat(r.center).addTo(this._map),this.options.popup&&this.mapMarker.setPopup(n)):r.geometry&&r.geometry.type&&r.geometry.type==="Point"&&r.geometry.coordinates&&(this.mapMarker.setLngLat(r.geometry.coordinates).addTo(this._map),this.options.popup&&this.mapMarker.setPopup(n)),this}},_removeMarker:function(){this.mapMarker&&(this.mapMarker.remove(),this.mapMarker=null)},_handleResultMarkers:function(r){if(this._map){this._removeResultMarkers();var e={color:"#4668F2"},t=Da({},e,this.options.showResultMarkers);return r.forEach((function(n){if(this.options.showResultMarkers&&this.options.showResultMarkers.element){var i=this.options.showResultMarkers.element.cloneNode(!0);t=Da(t,{element:i})}var s=new this._maplibregl.Marker(Da({},t,{element:i})),a;if(this.options.popup){var o={},A=Da({},o,this.options.popup);a=new this._maplibregl.Popup(A).setHTML(this.options.popupRender(n))}n.center?(s.setLngLat(n.center).addTo(this._map),this.options.popup&&s.setPopup(a)):n.geometry&&n.geometry.type&&n.geometry.type==="Point"&&n.geometry.coordinates&&(s.setLngLat(n.geometry.coordinates).addTo(this._map),this.options.popup&&s.setPopup(a)),this.resultMarkers.push(s)}).bind(this)),this}},_removeResultMarkers:function(){this.resultMarkers&&this.resultMarkers.length>0&&(this.resultMarkers.forEach(function(r){r.remove()}),this.resultMarkers=[])},on:function(r,e){return this._eventEmitter.on(r,e),this},off:function(r,e){return this._eventEmitter.removeListener(r,e),this}};var Nre=y4;const Qre=Bp(Nre);class Hre{constructor(e){this.options=e}onAdd(e){let t=this.options.defaultOptions;return this._map=e,this._img1=document.createElement("img"),this._img1.className="maplibregl-ctrl",this._img1.src=this.options.color?t.logoIcgcOptions.logoUrlColor:t.logoIcgcOptions.logoUrlWhite,this._img1.width=t.logoIcgcOptions.logoWidth,this._img1.title=t.logoIcgcOptions.logoTitle,this.link1=document.createElement("a"),this.link1.href=t.logoIcgcOptions.logoLink,this.link1.target="_blank",this.link1.appendChild(this._img1),this._container1=document.createElement("div"),this._container1.className="maplibregl-ctrl",this._container1.style.width=`${t.logoIcgcOptions.logoWidth}px`,this._container1.appendChild(this.link1),this._img2=document.createElement("img"),this._img2.className="maplibregl-ctrl",this._img2.src=this.options.color?t.logoGencatOptions.logoUrlColor:t.logoGencatOptions.logoUrlWhite,this._img2.width=t.logoGencatOptions.logoWidth,this._img2.title=t.logoGencatOptions.logoTitle,this.link2=document.createElement("a"),this.link2.href=t.logoGencatOptions.logoLink,this.link2.target="_blank",this.link2.appendChild(this._img2),this._container2=document.createElement("div"),this._container2.className="maplibregl-ctrl",this._container2.style.width=`${t.logoGencatOptions.logoWidth}px`,this._container2.appendChild(this.link2),this._mainContainer=document.createElement("div"),this._mainContainer.className="divLogos",this._mainContainer.style="display: flex",this._mainContainer.appendChild(this._container1),this._mainContainer.appendChild(this._container2),this._mainContainer}}var Ef=_4.prototype,S2="WGS 84";function _4(r){r!==void 0&&(S2=r),this.setEllipsoid(S2)}Ef.convertLatLngToUtm=function(r,e,t){var n;if(this.status)return"No ecclipsoid data associated with unknown datum: "+S2;if(!Number.isInteger(t))return"Precision is not integer number.";r=parseFloat(r),e=parseFloat(e);var i=e,s=this.toRadians(r),a=this.toRadians(i);i>=8&&i<=13&&r>54.5&&r<58||r>=56&&r<64&&i>=3&&i<12?n=32:(n=(i+180)/6+1,r>=72&&r<84&&(i>=0&&i<9?n=31:i>=9&&i<21?n=33:i>=21&&i<33?n=35:i>=33&&i<42&&(n=37))),n=parseInt(n);var o=(n-1)*6-180+3,A=this.toRadians(o),f=this.getUtmLetterDesignator(r),m=this.eccSquared/(1-this.eccSquared),v=this.a/Math.sqrt(1-this.eccSquared*Math.sin(s)*Math.sin(s)),x=Math.tan(s)*Math.tan(s),C=m*Math.cos(s)*Math.cos(s),M=Math.cos(s)*(a-A),U=this.a*((1-this.eccSquared/4-3*this.eccSquared*this.eccSquared/64-5*this.eccSquared*this.eccSquared*this.eccSquared/256)*s-(3*this.eccSquared/8+3*this.eccSquared*this.eccSquared/32+45*this.eccSquared*this.eccSquared*this.eccSquared/1024)*Math.sin(2*s)+(15*this.eccSquared*this.eccSquared/256+45*this.eccSquared*this.eccSquared*this.eccSquared/1024)*Math.sin(4*s)-35*this.eccSquared*this.eccSquared*this.eccSquared/3072*Math.sin(6*s)),Q=parseFloat(.9996*v*(M+(1-x+C)*M*M*M/6+(5-18*x+x*x+72*C-58*m)*M*M*M*M*M/120)+5e5),N=parseFloat(.9996*(U+v*Math.tan(s)*(M*M/2+(5-x+9*C+4*C*C)*M*M*M*M/24+(61-58*x+x*x+600*C-330*m)*M*M*M*M*M*M/720)));return r<0&&(N+=1e7),N=v4(N,t),Q=v4(Q,t),{Easting:Q,Northing:N,ZoneNumber:parseInt(n),ZoneLetter:f}},Ef.convertUtmToLatLng=function(r,e,t,n){var i=(1-Math.sqrt(1-this.eccSquared))/(1+Math.sqrt(1-this.eccSquared)),s=r-5e5,a=e,o=t,A=n;if(r===void 0)return"Please pass the UTMEasting!";if(e===void 0)return"Please pass the UTMNorthing!";if(t===void 0)return"Please pass the UTMZoneNumber!";if(n===void 0)return"Please pass the UTMZoneLetter!";["N","P","Q","R","S","T","U","V","W","X","Y","Z"].indexOf(A)!==-1||(a-=1e7);var f=(o-1)*6-180+3,m=this.eccSquared/(1-this.eccSquared),v=a/.9996,x=v/(this.a*(1-this.eccSquared/4-3*this.eccSquared*this.eccSquared/64-5*this.eccSquared*this.eccSquared*this.eccSquared/256)),C=x+(3*i/2-27*i*i*i/32)*Math.sin(2*x)+(21*i*i/16-55*i*i*i*i/32)*Math.sin(4*x)+151*i*i*i/96*Math.sin(6*x);this.toDegrees(C);var M=this.a/Math.sqrt(1-this.eccSquared*Math.sin(C)*Math.sin(C)),U=Math.tan(C)*Math.tan(C),Q=m*Math.cos(C)*Math.cos(C),N=this.a*(1-this.eccSquared)/Math.pow(1-this.eccSquared*Math.sin(C)*Math.sin(C),1.5),q=s/(M*.9996),Y=C-M*Math.tan(C)/N*(q*q/2-(5+3*U+10*Q-4*Q*Q-9*m)*q*q*q*q/24+(61+90*U+298*Q+45*U*U-252*m-3*Q*Q)*q*q*q*q*q*q/720);Y=this.toDegrees(Y);var te=(q-(1+2*U+Q)*q*q*q/6+(5-2*Q+28*U-3*Q*Q+8*m+24*U*U)*q*q*q*q*q/120)/Math.cos(C);return te=f+this.toDegrees(te),{lat:Y,lng:te}},Ef.getUtmLetterDesignator=function(r){return r=parseFloat(r),84>=r&&r>=72?"X":72>r&&r>=64?"W":64>r&&r>=56?"V":56>r&&r>=48?"U":48>r&&r>=40?"T":40>r&&r>=32?"S":32>r&&r>=24?"R":24>r&&r>=16?"Q":16>r&&r>=8?"P":8>r&&r>=0?"N":0>r&&r>=-8?"M":-8>r&&r>=-16?"L":-16>r&&r>=-24?"K":-24>r&&r>=-32?"J":-32>r&&r>=-40?"H":-40>r&&r>=-48?"G":-48>r&&r>=-56?"F":-56>r&&r>=-64?"E":-64>r&&r>=-72?"D":-72>r&&r>=-80?"C":"Z"},Ef.setEllipsoid=function(r){switch(r){case"Airy":this.a=6377563,this.eccSquared=.00667054;break;case"Australian National":this.a=6378160,this.eccSquared=.006694542;break;case"Bessel 1841":this.a=6377397,this.eccSquared=.006674372;break;case"Bessel 1841 Nambia":this.a=6377484,this.eccSquared=.006674372;break;case"Clarke 1866":this.a=6378206,this.eccSquared=.006768658;break;case"Clarke 1880":this.a=6378249,this.eccSquared=.006803511;break;case"Everest":this.a=6377276,this.eccSquared=.006637847;break;case"Fischer 1960 Mercury":this.a=6378166,this.eccSquared=.006693422;break;case"Fischer 1968":this.a=6378150,this.eccSquared=.006693422;break;case"GRS 1967":this.a=6378160,this.eccSquared=.006694605;break;case"GRS 1980":this.a=6378137,this.eccSquared=.00669438;break;case"Helmert 1906":this.a=6378200,this.eccSquared=.006693422;break;case"Hough":this.a=6378270,this.eccSquared=.00672267;break;case"International":this.a=6378388,this.eccSquared=.00672267;break;case"Krassovsky":this.a=6378245,this.eccSquared=.006693422;break;case"Modified Airy":this.a=6377340,this.eccSquared=.00667054;break;case"Modified Everest":this.a=6377304,this.eccSquared=.006637847;break;case"Modified Fischer 1960":this.a=6378155,this.eccSquared=.006693422;break;case"South American 1969":this.a=6378160,this.eccSquared=.006694542;break;case"WGS 60":this.a=6378165,this.eccSquared=.006693422;break;case"WGS 66":this.a=6378145,this.eccSquared=.006694542;break;case"WGS 72":this.a=6378135,this.eccSquared=.006694318;break;case"ED50":this.a=6378388,this.eccSquared=.00672267;break;case"WGS 84":case"EUREF89":case"ETRS89":this.a=6378137,this.eccSquared=.00669438;break;default:this.status=!0}},Ef.toDegrees=function(r){return r/Math.PI*180},Ef.toRadians=function(r){return r*Math.PI/180};function v4(r,e){var t=Math.pow(10,e);return Math.round(r*t)/t}var zre=_4;const Gre=Bp(zre);class Vre{constructor(e){this.options=e||{},this.options.utm=this.options.hasOwnProperty("utm")?this.options.utm:!0,this.options.lonlat=this.options.hasOwnProperty("lonlat")?this.options.lonlat:!0}onAdd(e){const t=new Gre;return this._map=e,this._container=document.createElement("div"),this._container.className="maplibregl-ctrl coordControl",this._container.style.width=`${this.options.width||"225px"}`,this._map.on("mousemove",n=>{const i=n.lngLat.lat,s=n.lngLat.lng;let a="",o="";const A=t.convertLatLngToUtm(i,s,2),f=i>0?"N":"S";this.options.utm&&(a=`ETRS89 UTM ${A.ZoneNumber}${f} X:<b> ${A.Easting}</b> Y:<b> ${A.Northing}</b> <br>`),this.options.lonlat&&(o=`WGS 84 Lon:<b> ${s.toFixed(5)}</b> Lat:<b> ${i.toFixed(5)}</b>`);const m=`${a}${o}`;this._container.innerHTML=m}),this._container}_lookUTM31(e,t){var n=0,i=0,s=6,a=84;return e>=n&&e<=s&&t>=i&&t<=a}onRemove(){this._container.parentNode.removeChild(this._container),this._map=void 0}}const T2={defaultOptions:{limitsUrl:"https://tilemaps.icgc.cat/vt/limits-tilejsonV3.json",geocoder:{peliasUrl1:"https://eines.icgc.cat/geocodificador/autocompletar?text=",peliasUrl2:"&layers=topo1%2Ctopo2%2Caddress&size=5"},mapOptions:{container:"map",center:{0:1.537786,1:41.837539},zoom:7.5,bearing:0,pitch:0,hash:!1,style:"https://geoserveis.icgc.cat/contextmaps/icgc_mapa_base_gris.json",maxZoom:18,maxPitch:85},logoIcgcOptions:{logoUrlColor:"https://tilemaps.icgc.cat/cdn/logos/icgc_logo_color.png",logoUrlWhite:"https://tilemaps.icgc.cat/cdn/logos/icgc_logo_blanc.svg",logoLink:"https://www.icgc.cat",logoTitle:"Institut Cartogràfic i Geològic de Catalunya",logoWidth:100},logoGencatOptions:{logoUrlColor:"https://tilemaps.icgc.cat/cdn/logos/gencat_logo_color.png",logoUrlWhite:"https://tilemaps.icgc.cat/cdn/logos/gencat_logo_blanc.png",logoLink:"https://web.gencat.cat/",logoTitle:"Generalitat de Catalunya",logoWidth:100},map3dOptions:{spaceErrorFactor:2,exaggeration:1,zfactor:48,minZoomRange:15.5,maxZoomRange:22,urlTilesetCities:"https://tilemaps.icgc.cat/vector/3dtiles/ciutats/v1/tilesetV1.0.json",layerIdOrder:"place-isolated",sourceLayerFilterId:"place",minZoomFilter:14,layerId3d:"edificisMapboxLayer",terrainSource:"ICGC5M",style3dName:"orto3d",imageIcon:"https://tilemaps.icgc.cat/cdn/images/stick.png"},baseStyles:[{key:"TOPO",url:"https://geoserveis.icgc.cat/contextmaps/icgc_mapa_estandard.json",image:"https://visors.icgc.cat/contextmaps/imatges_estil/icgc_mapa_estandard.png"},{key:"ORTO",url:"https://geoserveis.icgc.cat/contextmaps/icgc_orto_estandard.json",image:"https://visors.icgc.cat/contextmaps/imatges_estil/icgc_orto_hibrida.png"},{key:"ORTO3D",url:"https://tilemaps.icgc.cat/cdn/styles/icgc_orto_3d.json",image:"https://visors.icgc.cat/contextmaps/imatges_estil/icgc_orto_hibrida.png"},{key:"ADMIN",url:"https://geoserveis.icgc.cat/contextmaps/icgc_delimitacio_limits_administratius.json",image:"https://visors.icgc.cat/contextmaps/imatges_estil/icgc_delimitacio_limits_administratius.png"},{key:"DARK",url:"https://geoserveis.icgc.cat/contextmaps/icgc_mapa_base_fosc.json",image:"https://visors.icgc.cat/contextmaps/imatges_estil/icgc_mapa_base_fosc.png"},{key:"LIGHT",url:"https://geoserveis.icgc.cat/contextmaps/icgc_mapa_base_gris.json",image:"https://visors.icgc.cat/contextmaps/imatges_estil/icgc_mapa_base_gris.png"},{key:"GEOLOGY",url:"https://geoserveis.icgc.cat/contextmaps/icgc_geologic_informacio.json",image:"https://visors.icgc.cat/contextmaps/imatges_estil/icgc_geologic_informacio.png"}],urlTerrainICGC:[{name:"ICGC5M",url:"https://tilemaps.icgc.cat/tileserver/tileserver/terreny-5m-30m-rgb-extent/{z}/{x}/{y}.png"},{name:"WORLD30M",url:"https://s3.amazonaws.com/elevation-tiles-prod/terrarium/{z}/{x}/{y}.png",encoding:"terrarium"}],ortoLayersICGC:[{name:"ortofotoColorProvisional",key:"ortofoto_color_provisional",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_provisional"},{name:"ortofotoColor2022",key:"ortofoto_color_2022",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2022"},{name:"ortofotoColor2021",key:"ortofoto_color_2021",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2021"},{name:"ortofotoColor2020",key:"ortofoto_color_2020",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2020"},{name:"ortofotoColor2019",key:"ortofoto_color_2019",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2019"},{name:"ortofotoColor2018",key:"ortofoto_color_2018",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2018"},{name:"ortofotoColor2017",key:"ortofoto_color_2017",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2017"},{name:"ortofotoColor2016",key:"ortofoto_color_2016",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2016"},{name:"ortofotoColor2015",key:"ortofoto_color_2015",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2015"},{name:"ortofotoColor2014",key:"ortofoto_color_2014",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2014"},{name:"ortofotoColor2013",key:"ortofoto_color_2013",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2013"},{name:"ortofotoColor2012",key:"ortofoto_color_2012",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2012"},{name:"ortofotoColor2011",key:"ortofoto_color_2011",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2011"},{name:"ortofotoColor2010",key:"ortofoto_color_2010",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2010"},{name:"ortofotoColor2009",key:"ortofoto_color_2009",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2009"},{name:"ortofotoColor2008",key:"ortofoto_color_2008",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2008"},{name:"ortofotoColor20062007",key:"ortofoto_color_2006-2007",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2006-2007"},{name:"ortofotoColor20042005",key:"ortofoto_color_2004-2005",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2004-2005"},{name:"ortofotoColor20002003",key:"ortofoto_color_2000-2003",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2000-2003"},{name:"ortofotoBlancINegre1998",key:"ortofoto_blanc_i_negre_1998",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_blanc_i_negre_1998"},{name:"ortofotoBlancINegre19941997",key:"ortofoto_blanc_i_negre_1994-1997",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_blanc_i_negre_1994-1997"},{name:"ortofotoColor1993",key:"ortofoto_color_1993",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_1993"},{name:"ortofotoBlancINegre19831992",key:"ortofoto_blanc_i_negre_1983-1992",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_blanc_i_negre_1983-1992"},{name:"ortofotoBlancINegre19701977",key:"ortofoto_blanc_i_negre_1970-1977",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_blanc_i_negre_1970-1977"},{name:"ortofotoBlancINegre1956",key:"ortofoto_blanc_i_negre_1956",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_blanc_i_negre_1956"},{name:"ortofotoBlancINegre1945",key:"ortofoto_blanc_i_negre_1945",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_blanc_i_negre_1945"},{name:"ortofotoColorSerieAnual",key:"ortofoto_color_serie_anual",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_serie_anual"},{name:"ortofotoInfraroigProvisional",key:"ortofoto_infraroig_provisional",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_provisional"},{name:"ortofotoInfraroig2022",key:"ortofoto_infraroig_2022",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2022"},{name:"ortofotoInfraroig2021",key:"ortofoto_infraroig_2021",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2021"},{name:"ortofotoInfraroig2020",key:"ortofoto_infraroig_2020",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2020"},{name:"ortofotoInfraroig2019",key:"ortofoto_infraroig_2019",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2019"},{name:"ortofotoInfraroig2018",key:"ortofoto_infraroig_2018",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2018"},{name:"ortofotoInfraroig2017",key:"ortofoto_infraroig_2017",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2017"},{name:"ortofotoInfraroig2016",key:"ortofoto_infraroig_2016",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2016"},{name:"ortofotoInfraroig2015",key:"ortofoto_infraroig_2015",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2015"},{name:"ortofotoInfraroig2014",key:"ortofoto_infraroig_2014",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2014"},{name:"ortofotoInfraroig2013",key:"ortofoto_infraroig_2013",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2013"},{name:"ortofotoInfraroig2012",key:"ortofoto_infraroig_2012",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2012"},{name:"ortofotoInfraroig2011",key:"ortofoto_infraroig_2011",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2011"},{name:"ortofotoInfraroig2010",key:"ortofoto_infraroig_2010",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2010"},{name:"ortofotoInfraroig2009",key:"ortofoto_infraroig_2009",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2009"},{name:"ortofotoInfraroig2008",key:"ortofoto_infraroig_2008",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2008"},{name:"ortofotoInfraroig20062007",key:"ortofoto_infraroig_2006-2007",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2006-2007"},{name:"ortofotoInfraroig19961997",key:"ortofoto_infraroig_1996-1997",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_1996-1997"},{name:"ortofotoInfraroigSerieAnual",key:"ortofoto_infraroig_serie_anual",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_serie_anual"}],vectorLayersICGC:[{name:"agrupacionsCensals2015",key:"agrupacions_censals_2015"},{name:"agrupacionsCensals2016",key:"agrupacions_censals_2016"},{name:"agrupacionsCensals2017",key:"agrupacions_censals_2017"},{name:"agrupacionsCensals2018",key:"agrupacions_censals_2018"},{name:"agrupacionsCensals2019",key:"agrupacions_censals_2019"},{name:"agrupacionsCensals2020",key:"agrupacions_censals_2020"},{name:"agrupacionsCensals2021",key:"agrupacions_censals_2021"},{name:"agrupacionsCensalsVigent",key:"agrupacions_censals_vigent"},{name:"agrupacionsCensalsVigentText",key:"agrupacions_censals_vigent_text"},{name:"areesBasiquesPolicials2019",key:"arees_basiques_policials_2019"},{name:"areesBasiquesPolicials2020",key:"arees_basiques_policials_2020"},{name:"areesBasiquesPolicials2022",key:"arees_basiques_policials_2022"},{name:"areesBasiquesPolicialsVigent",key:"arees_basiques_policials_vigent"},{name:"areesBasiquesPolicialsVigentText",key:"arees_basiques_policials_vigent_text"},{name:"areesBasiquesSalutVigent",key:"arees_basiques_salut_vigent"},{name:"areesBasiquesServeisSocialsVigent",key:"arees_basiques_serveis_socials_vigent"},{name:"areesBasiquesServeisSocialsVigentText",key:"arees_basiques_serveis_socials_vigent_text"},{name:"areesGestioAssistencialVigent",key:"arees_gestio_assistencial_vigent"},{name:"areesHidrogeologiquesAquifersVigent",key:"arees_hidrogeologiques_aquifers_vigent"},{name:"catalunyaVigent",key:"catalunya_vigent"},{name:"catalunyaVigentText",key:"catalunya_vigent_text"},{name:"comarques2022",key:"comarques_2022"},{name:"comarquesVigent",key:"comarques_vigent"},{name:"comarquesVigentText",key:"comarques_vigent_text"},{name:"districtesCensals2015",key:"districtes_censals_2015"},{name:"districtesCensals2016",key:"districtes_censals_2016"},{name:"districtesCensals2017",key:"districtes_censals_2017"},{name:"districtesCensals2018",key:"districtes_censals_2018"},{name:"districtesCensals2019",key:"districtes_censals_2019"},{name:"districtesCensals2020",key:"districtes_censals_2020"},{name:"districtesCensals2021",key:"districtes_censals_2021"},{name:"districtesCensals2022",key:"districtes_censals_2022"},{name:"districtesCensalsVigent",key:"districtes_censals_vigent"},{name:"districtesCensalsVigentText",key:"districtes_censals_vigent_text"},{name:"incendisForestalsVigent",key:"incendis_forestals_vigent"},{name:"incendisForestalsVigentText",key:"incendis_forestals_vigent_text"},{name:"municipis2022",key:"municipis_2022"},{name:"municipis2022Text",key:"municipis_2022_text"},{name:"municipisVigent",key:"municipis_vigent"},{name:"municipisVigentText",key:"municipis_vigent_text"},{name:"partitsJudicialsVigent",key:"partits_judicials_vigent"},{name:"partitsJudicialsVigentText",key:"partits_judicials_vigent_text"},{name:"plaTerritorial2015",key:"pla_territorial_2015"},{name:"plaTerritorialVigent",key:"pla_territorial_vigent"},{name:"plaTerritorialVigentText",key:"pla_territorial_vigent_text"},{name:"provinciesVigent",key:"provincies_vigent"},{name:"provinciesVigentText",key:"provincies_vigent_text"},{name:"regionsPolicialsVigent",key:"regions_policials_vigent"},{name:"regionsPolicialsVigentText",key:"regions_policials_vigent_text"},{name:"regionsSanitariesVigent",key:"regions_sanitaries_vigent"},{name:"regionsSanitariesVigentText",key:"regions_sanitaries_vigent_text"},{name:"seccionsCensals2015",key:"seccions_censals_2015"},{name:"seccionsCensals2016",key:"seccions_censals_2016"},{name:"seccionsCensals2017",key:"seccions_censals_2017"},{name:"seccionsCensals2018",key:"seccions_censals_2018"},{name:"seccionsCensals2019",key:"seccions_censals_2019"},{name:"seccionsCensals2020",key:"seccions_censals_2020"},{name:"seccionsCensals2021",key:"seccions_censals_2021"},{name:"seccionsCensals2022",key:"seccions_censals_2022"},{name:"seccionsCensalsVigent",key:"seccions_censals_vigent"},{name:"seccionsCensalsVigentText",key:"seccions_censals_vigent_text"},{name:"sectorsSanitarisVigent",key:"sectors_sanitaris_vigent"},{name:"vegueriesVigent",key:"vegueries_vigent"},{name:"vegueriesVigentText",key:"vegueries_vigent_text"}],vectorLayers:[{key:"cobertes2018",url:"https://tilemaps.icgc.cat/tileserver/cobertes_tilejson.json",legend:"https://tilemaps.icgc.cat/cdn/images/llegendaCobertesSol2018.jpg"}],wmsLayers:[{key:"espaisInteresGeologic",layer:"",url:"https://geoserveis.icgc.cat/servei/catalunya/espais-interes-geologic/wms/service?&service=WMS&request=GetMap&layers=espais-interes-geologic&styles=&format=image%2Fpng&transparent=true&version=1.1.1&tipus=wms&width=512&height=512&srs=EPSG%3A3857&bbox={bbox-epsg-3857}"},{key:"gravimetriaBouguer500000",layer:"",url:"https://geoserveis.icgc.cat/servei/catalunya/gravimetria/wms/service?&service=WMS&request=GetMap&layers=anomalia_bouguer_500000&styles=&format=image%2Fpng&transparent=true&version=1.1.1&tipus=wms&width=512&height=512&srs=EPSG%3A3857&bbox={bbox-epsg-3857}"},{key:"cobertesSol2018",layer:"",url:"https://geoserveis.icgc.cat/servei/catalunya/cobertes-sol/wms/service?&service=WMS&request=GetMap&layers=cobertes_2018&styles=&format=image%2Fpng&transparent=true&version=1.1.1&tipus=wms&width=512&height=512&srs=EPSG%3A3857&bbox={bbox-epsg-3857}"},{key:"administratiu",layer:"",url:"http://geoserveis.icgc.cat/servei/catalunya/mapa-base/wmts/administratiu/MON3857NW/{z}/{x}/{y}.png"},{key:"simplificat",layer:"",url:"http://geoserveis.icgc.cat/servei/catalunya/mapa-base/wmts/simplificat/MON3857NW/{z}/{x}/{y}.png"},{key:"cims",layer:"",url:"https://geoserveis.icgc.cat/icc_100cims/wms/service?REQUEST=GetMap&SERVICE=WMS&VERSION=1.1.1&LAYERS=0&STYLES=&FORMAT=image/png&BGCOLOR=0xFFFFFF&TRANSPARENT=TRUE&SRS=EPSG:25831&BBOX=137118.923076923,4488408.75,650959.076923077,4749634.75&WIDTH=895&HEIGHT=455"},{key:"cobertesSol",layer:"",url:"http://geoserveis.icgc.cat/servei/catalunya/cobertes-sol/wms?REQUEST=GetMap&SERVICE=WMS&VERSION=1.3.0&LAYERS=cobertes_2009&STYLES=&FORMAT=image/png&BGCOLOR=0xFFFFFF&TRANSPARENT=TRUE&CRS=EPSG:25831&BBOX=374110.828167253,4639230.79853085,452621.120632226,4703578.45000215&WIDTH=1020&HEIGHT=836"}],fgbLayers:[{name:"agrupacionsCensalsVigent",key:"agrupacions_censals_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/agrupacions_censals_vigent.fgb"},{name:"agrupacionsCensalsVigentText",key:"agrupacions_censals_vigent_text",url:"https://tilemaps.icgc.cat/vector/fgb/agrupacions_censals_vigent_text.fgb"},{name:"areesBasiquesPolicialsVigent",key:"arees_basiques_policials_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/arees_basiques_policials_vigent.fgb"},{name:"areesBasiquesPolicialsVigentText",key:"arees_basiques_policials_vigent_text",url:"https://tilemaps.icgc.cat/vector/fgb/arees_basiques_policials_vigent_text.fgb"},{name:"areesBasiquesSalutVigent",key:"arees_basiques_salut_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/arees_basiques_salut_vigent.fgb"},{name:"areesBasiquesServeisSocialsVigent",key:"arees_basiques_serveis_socials_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/arees_basiques_serveis_socials_vigent.fgb"},{name:"areesBasiquesServeisSocialsVigentText",key:"arees_basiques_serveis_socials_vigent_text",url:"https://tilemaps.icgc.cat/vector/fgb/arees_basiques_serveis_socials_vigent_text.fgb"},{name:"areesGestioAssistencialVigent",key:"arees_gestio_assistencial_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/arees_gestio_assistencial_vigent.fgb"},{name:"areesHidrogeologiquesAquifersVigent",key:"arees_hidrogeologiques_aquifers_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/arees_hidrogeologiques_aquifers_vigent.fgb"},{name:"catalunyaVigent",key:"catalunya_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/catalunya_vigent.fgb"},{name:"catalunyaVigentText",key:"catalunya_vigent_text",url:"https://tilemaps.icgc.cat/vector/fgb/catalunya_vigent_text.fgb"},{name:"comarquesVigent",key:"comarques_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/comarques_vigent.fgb"},{name:"comarquesVigentText",key:"comarques_vigent_text",url:"https://tilemaps.icgc.cat/vector/fgb/comarques_vigent_text.fgb"},{name:"districtesCensalsVigent",key:"districtes_censals_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/districtes_censals_vigent.fgb"},{name:"districtesCensalsVigentText",key:"districtes_censals_vigent_text",url:"https://tilemaps.icgc.cat/vector/fgb/districtes_censals_vigent_text.fgb"},{name:"incendisForestalsVigent",key:"incendis_forestals_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/incendis_forestals_vigent.fgb"},{name:"incendisForestalsVigentText",key:"incendis_forestals_vigent_text",url:"https://tilemaps.icgc.cat/vector/fgb/incendis_forestals_vigent_text.fgb"},{name:"municipisVigent",key:"municipis_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/municipis_vigent.fgb"},{name:"municipisVigentText",key:"municipis_vigent_text",url:"https://tilemaps.icgc.cat/vector/fgb/municipis_vigent_text.fgb"},{name:"partitsJudicialsVigent",key:"partits_judicials_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/partits_judicials_vigent.fgb"},{name:"partitsJudicialsVigentText",key:"partits_judicials_vigent_text",url:"https://tilemaps.icgc.cat/vector/fgb/partits_judicials_vigent_text.fgb"},{name:"plaTerritorialVigent",key:"pla_territorial_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/pla_territorial_vigent.fgb"},{name:"plaTerritorialVigentText",key:"pla_territorial_vigent_text",url:"https://tilemaps.icgc.cat/vector/fgb/pla_territorial_vigent_text.fgb"},{name:"provinciesVigent",key:"provincies_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/provincies_vigent.fgb"},{name:"provinciesVigentText",key:"provincies_vigent_text",url:"https://tilemaps.icgc.cat/vector/fgb/provincies_vigent_text.fgb"},{name:"regionsPolicialsVigent",key:"regions_policials_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/regions_policials_vigent.fgb"},{name:"regionsPolicialsVigentText",key:"regions_policials_vigent_text",url:"https://tilemaps.icgc.cat/vector/fgb/regions_policials_vigent_text.fgb"},{name:"regionsSanitariesVigent",key:"regions_sanitaries_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/regions_sanitaries_vigent.fgb"},{name:"regionsSanitariesVigentText",key:"regions_sanitaries_vigent_text",url:"https://tilemaps.icgc.cat/vector/fgb/regions_sanitaries_vigent_text.fgb"},{name:"seccionsCensalsVigent",key:"seccions_censals_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/seccions_censals_vigent.fgb"},{name:"seccionsCensalsVigentText",key:"seccions_censals_vigent_text",url:"https://tilemaps.icgc.cat/vector/fgb/seccions_censals_vigent_text.fgb"},{name:"sectorsSanitarisVigent",key:"sectors_sanitaris_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/sectors_sanitaris_vigent.fgb"},{name:"vegueriesVigent",key:"vegueries_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/vegueries_vigent.fgb"},{name:"vegueriesVigentText",key:"vegueries_vigent_text",url:"https://tilemaps.icgc.cat/vector/fgb/vegueries_vigent_text.fgb"}]},Styles:{TOPO:"https://geoserveis.icgc.cat/contextmaps/icgc_mapa_estandard.json",ORTO:"https://geoserveis.icgc.cat/contextmaps/icgc_orto_estandard.json",ORTO3D:"https://tilemaps.icgc.cat/cdn/styles/icgc_orto_3d.json",ADMIN:"https://geoserveis.icgc.cat/contextmaps/icgc_delimitacio_limits_administratius.json",DARK:"https://geoserveis.icgc.cat/contextmaps/icgc_mapa_base_fosc.json",LIGHT:"https://geoserveis.icgc.cat/contextmaps/icgc_mapa_base_gris.json",GEOLOGY:"https://geoserveis.icgc.cat/contextmaps/icgc_geologic_informacio.json"},Terrains:{ICGC5M:"https://tilemaps.icgc.cat/tileserver/tileserver/terreny-5m-30m-rgb-extent/{z}/{x}/{y}.png",WORLD30M:"https://s3.amazonaws.com/elevation-tiles-prod/terrarium/{z}/{x}/{y}.png"},Layers:{Orto:{ortofotoColorProvisional:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_provisional",ortofotoColor2022:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2022",ortofotoColor2021:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2021",ortofotoColor2020:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2020",ortofotoColor2019:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2019",ortofotoColor2018:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2018",ortofotoColor2017:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2017",ortofotoColor2016:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2016",ortofotoColor2015:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2015",ortofotoColor2014:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2014",ortofotoColor2013:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2013",ortofotoColor2012:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2012",ortofotoColor2011:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2011",ortofotoColor2010:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2010",ortofotoColor2009:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2009",ortofotoColor2008:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2008",ortofotoColor20062007:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2006-2007",ortofotoColor20042005:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2004-2005",ortofotoColor20002003:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2000-2003",ortofotoBlancINegre1998:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_blanc_i_negre_1998",ortofotoBlancINegre19941997:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_blanc_i_negre_1994-1997",ortofotoColor1993:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_1993",ortofotoBlancINegre19831992:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_blanc_i_negre_1983-1992",ortofotoBlancINegre19701977:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_blanc_i_negre_1970-1977",ortofotoBlancINegre1956:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_blanc_i_negre_1956",ortofotoBlancINegre1945:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_blanc_i_negre_1945",ortofotoColorSerieAnual:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_serie_anual",ortofotoInfraroigProvisional:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_provisional",ortofotoInfraroig2022:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2022",ortofotoInfraroig2021:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2021",ortofotoInfraroig2020:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2020",ortofotoInfraroig2019:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2019",ortofotoInfraroig2018:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2018",ortofotoInfraroig2017:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2017",ortofotoInfraroig2016:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2016",ortofotoInfraroig2015:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2015",ortofotoInfraroig2014:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2014",ortofotoInfraroig2013:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2013",ortofotoInfraroig2012:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2012",ortofotoInfraroig2011:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2011",ortofotoInfraroig2010:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2010",ortofotoInfraroig2009:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2009",ortofotoInfraroig2008:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2008",ortofotoInfraroig20062007:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2006-2007",ortofotoInfraroig19961997:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_1996-1997",ortofotoInfraroigSerieAnual:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_serie_anual"},VectorAdmin:{agrupacionsCensals2015:"agrupacions_censals_2015",agrupacionsCensals2016:"agrupacions_censals_2016",agrupacionsCensals2017:"agrupacions_censals_2017",agrupacionsCensals2018:"agrupacions_censals_2018",agrupacionsCensals2019:"agrupacions_censals_2019",agrupacionsCensals2020:"agrupacions_censals_2020",agrupacionsCensals2021:"agrupacions_censals_2021",agrupacionsCensalsVigent:"agrupacions_censals_vigent",agrupacionsCensalsVigentText:"agrupacions_censals_vigent_text",areesBasiquesPolicials2019:"arees_basiques_policials_2019",areesBasiquesPolicials2020:"arees_basiques_policials_2020",areesBasiquesPolicials2022:"arees_basiques_policials_2022",areesBasiquesPolicialsVigent:"arees_basiques_policials_vigent",areesBasiquesPolicialsVigentText:"arees_basiques_policials_vigent_text",areesBasiquesSalutVigent:"arees_basiques_salut_vigent",areesBasiquesServeisSocialsVigent:"arees_basiques_serveis_socials_vigent",areesBasiquesServeisSocialsVigentText:"arees_basiques_serveis_socials_vigent_text",areesGestioAssistencialVigent:"arees_gestio_assistencial_vigent",areesHidrogeologiquesAquifersVigent:"arees_hidrogeologiques_aquifers_vigent",catalunyaVigent:"catalunya_vigent",catalunyaVigentText:"catalunya_vigent_text",comarques2022:"comarques_2022",comarquesVigent:"comarques_vigent",comarquesVigentText:"comarques_vigent_text",districtesCensals2015:"districtes_censals_2015",districtesCensals2016:"districtes_censals_2016",districtesCensals2017:"districtes_censals_2017",districtesCensals2018:"districtes_censals_2018",districtesCensals2019:"districtes_censals_2019",districtesCensals2020:"districtes_censals_2020",districtesCensals2021:"districtes_censals_2021",districtesCensals2022:"districtes_censals_2022",districtesCensalsVigent:"districtes_censals_vigent",districtesCensalsVigentText:"districtes_censals_vigent_text",incendisForestalsVigent:"incendis_forestals_vigent",incendisForestalsVigentText:"incendis_forestals_vigent_text",municipis2022:"municipis_2022",municipis2022Text:"municipis_2022_text",municipisVigent:"municipis_vigent",municipisVigentText:"municipis_vigent_text",partitsJudicialsVigent:"partits_judicials_vigent",partitsJudicialsVigentText:"partits_judicials_vigent_text",plaTerritorial2015:"pla_territorial_2015",plaTerritorialVigent:"pla_territorial_vigent",plaTerritorialVigentText:"pla_territorial_vigent_text",provinciesVigent:"provincies_vigent",provinciesVigentText:"provincies_vigent_text",regionsPolicialsVigent:"regions_policials_vigent",regionsPolicialsVigentText:"regions_policials_vigent_text",regionsSanitariesVigent:"regions_sanitaries_vigent",regionsSanitariesVigentText:"regions_sanitaries_vigent_text",seccionsCensals2015:"seccions_censals_2015",seccionsCensals2016:"seccions_censals_2016",seccionsCensals2017:"seccions_censals_2017",seccionsCensals2018:"seccions_censals_2018",seccionsCensals2019:"seccions_censals_2019",seccionsCensals2020:"seccions_censals_2020",seccionsCensals2021:"seccions_censals_2021",seccionsCensals2022:"seccions_censals_2022",seccionsCensalsVigent:"seccions_censals_vigent",seccionsCensalsVigentText:"seccions_censals_vigent_text",sectorsSanitarisVigent:"sectors_sanitaris_vigent",vegueriesVigent:"vegueries_vigent",vegueriesVigentText:"vegueries_vigent_text"},FGBAdmin:{agrupacionsCensalsVigent:"https://tilemaps.icgc.cat/vector/fgb/agrupacions_censals_vigent.fgb",agrupacionsCensalsVigentText:"https://tilemaps.icgc.cat/vector/fgb/agrupacions_censals_vigent_text.fgb",areesBasiquesPolicialsVigent:"https://tilemaps.icgc.cat/vector/fgb/arees_basiques_policials_vigent.fgb",areesBasiquesPolicialsVigentText:"https://tilemaps.icgc.cat/vector/fgb/arees_basiques_policials_vigent_text.fgb",areesBasiquesSalutVigent:"https://tilemaps.icgc.cat/vector/fgb/arees_basiques_salut_vigent.fgb",areesBasiquesServeisSocialsVigent:"https://tilemaps.icgc.cat/vector/fgb/arees_basiques_serveis_socials_vigent.fgb",areesBasiquesServeisSocialsVigentText:"https://tilemaps.icgc.cat/vector/fgb/arees_basiques_serveis_socials_vigent_text.fgb",areesGestioAssistencialVigent:"https://tilemaps.icgc.cat/vector/fgb/arees_gestio_assistencial_vigent.fgb",areesHidrogeologiquesAquifersVigent:"https://tilemaps.icgc.cat/vector/fgb/arees_hidrogeologiques_aquifers_vigent.fgb",catalunyaVigent:"https://tilemaps.icgc.cat/vector/fgb/catalunya_vigent.fgb",catalunyaVigentText:"https://tilemaps.icgc.cat/vector/fgb/catalunya_vigent_text.fgb",comarquesVigent:"https://tilemaps.icgc.cat/vector/fgb/comarques_vigent.fgb",comarquesVigentText:"https://tilemaps.icgc.cat/vector/fgb/comarques_vigent_text.fgb",districtesCensalsVigent:"https://tilemaps.icgc.cat/vector/fgb/districtes_censals_vigent.fgb",districtesCensalsVigentText:"https://tilemaps.icgc.cat/vector/fgb/districtes_censals_vigent_text.fgb",incendisForestalsVigent:"https://tilemaps.icgc.cat/vector/fgb/incendis_forestals_vigent.fgb",incendisForestalsVigentText:"https://tilemaps.icgc.cat/vector/fgb/incendis_forestals_vigent_text.fgb",municipisVigent:"https://tilemaps.icgc.cat/vector/fgb/municipis_vigent.fgb",municipisVigentText:"https://tilemaps.icgc.cat/vector/fgb/municipis_vigent_text.fgb",partitsJudicialsVigent:"https://tilemaps.icgc.cat/vector/fgb/partits_judicials_vigent.fgb",partitsJudicialsVigentText:"https://tilemaps.icgc.cat/vector/fgb/partits_judicials_vigent_text.fgb",plaTerritorialVigent:"https://tilemaps.icgc.cat/vector/fgb/pla_territorial_vigent.fgb",plaTerritorialVigentText:"https://tilemaps.icgc.cat/vector/fgb/pla_territorial_vigent_text.fgb",provinciesVigent:"https://tilemaps.icgc.cat/vector/fgb/provincies_vigent.fgb",provinciesVigentText:"https://tilemaps.icgc.cat/vector/fgb/provincies_vigent_text.fgb",regionsPolicialsVigent:"https://tilemaps.icgc.cat/vector/fgb/regions_policials_vigent.fgb",regionsPolicialsVigentText:"https://tilemaps.icgc.cat/vector/fgb/regions_policials_vigent_text.fgb",regionsSanitariesVigent:"https://tilemaps.icgc.cat/vector/fgb/regions_sanitaries_vigent.fgb",regionsSanitariesVigentText:"https://tilemaps.icgc.cat/vector/fgb/regions_sanitaries_vigent_text.fgb",seccionsCensalsVigent:"https://tilemaps.icgc.cat/vector/fgb/seccions_censals_vigent.fgb",seccionsCensalsVigentText:"https://tilemaps.icgc.cat/vector/fgb/seccions_censals_vigent_text.fgb",sectorsSanitarisVigent:"https://tilemaps.icgc.cat/vector/fgb/sectors_sanitaris_vigent.fgb",vegueriesVigent:"https://tilemaps.icgc.cat/vector/fgb/vegueries_vigent.fgb",vegueriesVigentText:"https://tilemaps.icgc.cat/vector/fgb/vegueries_vigent_text.fgb"},Vector:{cobertes2018:"https://tilemaps.icgc.cat/tileserver/cobertes_tilejson.json"},WMS:{espaisInteresGeologic:"https://geoserveis.icgc.cat/servei/catalunya/espais-interes-geologic/wms/service?&service=WMS&request=GetMap&layers=espais-interes-geologic&styles=&format=image%2Fpng&transparent=true&version=1.1.1&tipus=wms&width=512&height=512&srs=EPSG%3A3857&bbox={bbox-epsg-3857}",gravimetriaBouguer500000:"https://geoserveis.icgc.cat/servei/catalunya/gravimetria/wms/service?&service=WMS&request=GetMap&layers=anomalia_bouguer_500000&styles=&format=image%2Fpng&transparent=true&version=1.1.1&tipus=wms&width=512&height=512&srs=EPSG%3A3857&bbox={bbox-epsg-3857}",cobertesSol2018:"https://geoserveis.icgc.cat/servei/catalunya/cobertes-sol/wms/service?&service=WMS&request=GetMap&layers=cobertes_2018&styles=&format=image%2Fpng&transparent=true&version=1.1.1&tipus=wms&width=512&height=512&srs=EPSG%3A3857&bbox={bbox-epsg-3857}",administratiu:"http://geoserveis.icgc.cat/servei/catalunya/mapa-base/wmts/administratiu/MON3857NW/{z}/{x}/{y}.png",simplificat:"http://geoserveis.icgc.cat/servei/catalunya/mapa-base/wmts/simplificat/MON3857NW/{z}/{x}/{y}.png",cims:"https://geoserveis.icgc.cat/icc_100cims/wms/service?REQUEST=GetMap&SERVICE=WMS&VERSION=1.1.1&LAYERS=0&STYLES=&FORMAT=image/png&BGCOLOR=0xFFFFFF&TRANSPARENT=TRUE&SRS=EPSG:25831&BBOX=137118.923076923,4488408.75,650959.076923077,4749634.75&WIDTH=895&HEIGHT=455",cobertesSol:"http://geoserveis.icgc.cat/servei/catalunya/cobertes-sol/wms?REQUEST=GetMap&SERVICE=WMS&VERSION=1.3.0&LAYERS=cobertes_2009&STYLES=&FORMAT=image/png&BGCOLOR=0xFFFFFF&TRANSPARENT=TRUE&CRS=EPSG:25831&BBOX=374110.828167253,4639230.79853085,452621.120632226,4703578.45000215&WIDTH=1020&HEIGHT=836"}}},xy=T2.Terrains,Sf=T2.Styles,Ti=T2.Layers,Hn={limitsUrl:"https://tilemaps.icgc.cat/vt/limits-tilejsonV3.json",geocoder:{peliasUrl1:"https://eines.icgc.cat/geocodificador/autocompletar?text=",peliasUrl2:"&layers=topo1%2Ctopo2%2Caddress&size=5"},mapOptions:{container:"map",center:{0:1.537786,1:41.837539},zoom:7.5,bearing:0,pitch:0,hash:!1,style:"https://geoserveis.icgc.cat/contextmaps/icgc_mapa_base_gris.json.json",maxZoom:18,maxPitch:85},logoIcgcOptions:{logoUrlColor:"https://tilemaps.icgc.cat/cdn/logos/icgc_logo_color.png",logoUrlWhite:"https://tilemaps.icgc.cat/cdn/logos/icgc_logo_blanc.svg",logoLink:"https://www.icgc.cat",logoTitle:"Institut Cartogràfic i Geològic de Catalunya",logoWidth:100},logoGencatOptions:{logoUrlColor:"https://tilemaps.icgc.cat/cdn/logos/gencat_logo_color.png",logoUrlWhite:"https://tilemaps.icgc.cat/cdn/logos/gencat_logo_blanc.png",logoLink:"https://web.gencat.cat/",logoTitle:"Generalitat de Catalunya",logoWidth:100},map3dOptions:{spaceErrorFactor:2,exaggeration:1,zfactor:48,minZoomRange:15.5,maxZoomRange:22,urlTilesetCities:"https://tilemaps.icgc.cat/vector/3dtiles/ciutats/v1/tilesetV1.0.json",layerIdOrder:"place-isolated",sourceLayerFilterId:"place",minZoomFilter:14,layerId3d:"edificisMapboxLayer",terrainSource:"ICGC5M",style3dName:"orto3d",imageIcon:"https://tilemaps.icgc.cat/cdn/images/stick.png"},baseStyles:{0:{key:"TOPO",url:"https://geoserveis.icgc.cat/contextmaps/icgc_mapa_estandard_general.json",image:"https://visors.icgc.cat/contextmaps/imatges_estil/icgc_mapa_estandard.png"},1:{key:"ORTO",url:"https://geoserveis.icgc.cat/contextmaps/icgc_orto_estandard.json",image:"https://visors.icgc.cat/contextmaps/imatges_estil/icgc_orto_hibrida.png"},2:{key:"ORTO3D",url:"https://tilemaps.icgc.cat/cdn/styles/icgc_orto_3d.json",image:"https://visors.icgc.cat/contextmaps/imatges_estil/icgc_orto_hibrida.png"},3:{key:"ADMIN",url:"https://geoserveis.icgc.cat/contextmaps/icgc_delimitacio_limits_administratius.json",image:"https://visors.icgc.cat/contextmaps/imatges_estil/icgc_delimitacio_limits_administratius.png"},4:{key:"DARK",url:"https://geoserveis.icgc.cat/contextmaps/icgc_mapa_base_fosc.json",image:"https://visors.icgc.cat/contextmaps/imatges_estil/icgc_mapa_base_fosc.png"},5:{key:"LIGHT",url:"https://geoserveis.icgc.cat/contextmaps/icgc_mapa_base_gris.json",image:"https://visors.icgc.cat/contextmaps/imatges_estil/icgc_mapa_base_gris.png"},6:{key:"GEOLOGY",url:"https://geoserveis.icgc.cat/contextmaps/icgc_geologic_informacio.json",image:"https://visors.icgc.cat/contextmaps/imatges_estil/icgc_geologic_informacio.png"}},urlTerrainICGC:{0:{name:"ICGC5M",url:"https://tilemaps.icgc.cat/tileserver/tileserver/terreny-5m-30m-rgb-extent/{z}/{x}/{y}.png"},1:{name:"WORLD30M",url:"https://s3.amazonaws.com/elevation-tiles-prod/terrarium/{z}/{x}/{y}.png",encoding:"terrarium"}},ortoLayersICGC:{0:{name:"ortofotoColorProvisional",key:"ortofoto_color_provisional",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_provisional"},1:{name:"ortofotoColor2022",key:"ortofoto_color_2022",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2022"},2:{name:"ortofotoColor2021",key:"ortofoto_color_2021",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2021"},3:{name:"ortofotoColor2020",key:"ortofoto_color_2020",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2020"},4:{name:"ortofotoColor2019",key:"ortofoto_color_2019",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2019"},5:{name:"ortofotoColor2018",key:"ortofoto_color_2018",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2018"},6:{name:"ortofotoColor2017",key:"ortofoto_color_2017",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2017"},7:{name:"ortofotoColor2016",key:"ortofoto_color_2016",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2016"},8:{name:"ortofotoColor2015",key:"ortofoto_color_2015",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2015"},9:{name:"ortofotoColor2014",key:"ortofoto_color_2014",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2014"},10:{name:"ortofotoColor2013",key:"ortofoto_color_2013",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2013"},11:{name:"ortofotoColor2012",key:"ortofoto_color_2012",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2012"},12:{name:"ortofotoColor2011",key:"ortofoto_color_2011",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2011"},13:{name:"ortofotoColor2010",key:"ortofoto_color_2010",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2010"},14:{name:"ortofotoColor2009",key:"ortofoto_color_2009",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2009"},15:{name:"ortofotoColor2008",key:"ortofoto_color_2008",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2008"},16:{name:"ortofotoColor20062007",key:"ortofoto_color_2006-2007",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2006-2007"},17:{name:"ortofotoColor20042005",key:"ortofoto_color_2004-2005",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2004-2005"},18:{name:"ortofotoColor20002003",key:"ortofoto_color_2000-2003",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2000-2003"},19:{name:"ortofotoBlancINegre1998",key:"ortofoto_blanc_i_negre_1998",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_blanc_i_negre_1998"},20:{name:"ortofotoBlancINegre19941997",key:"ortofoto_blanc_i_negre_1994-1997",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_blanc_i_negre_1994-1997"},21:{name:"ortofotoColor1993",key:"ortofoto_color_1993",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_1993"},22:{name:"ortofotoBlancINegre19831992",key:"ortofoto_blanc_i_negre_1983-1992",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_blanc_i_negre_1983-1992"},23:{name:"ortofotoBlancINegre19701977",key:"ortofoto_blanc_i_negre_1970-1977",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_blanc_i_negre_1970-1977"},24:{name:"ortofotoBlancINegre1956",key:"ortofoto_blanc_i_negre_1956",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_blanc_i_negre_1956"},25:{name:"ortofotoBlancINegre1945",key:"ortofoto_blanc_i_negre_1945",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_blanc_i_negre_1945"},26:{name:"ortofotoColorSerieAnual",key:"ortofoto_color_serie_anual",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_serie_anual"},27:{name:"ortofotoInfraroigProvisional",key:"ortofoto_infraroig_provisional",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_provisional"},28:{name:"ortofotoInfraroig2022",key:"ortofoto_infraroig_2022",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2022"},29:{name:"ortofotoInfraroig2021",key:"ortofoto_infraroig_2021",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2021"},30:{name:"ortofotoInfraroig2020",key:"ortofoto_infraroig_2020",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2020"},31:{name:"ortofotoInfraroig2019",key:"ortofoto_infraroig_2019",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2019"},32:{name:"ortofotoInfraroig2018",key:"ortofoto_infraroig_2018",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2018"},33:{name:"ortofotoInfraroig2017",key:"ortofoto_infraroig_2017",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2017"},34:{name:"ortofotoInfraroig2016",key:"ortofoto_infraroig_2016",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2016"},35:{name:"ortofotoInfraroig2015",key:"ortofoto_infraroig_2015",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2015"},36:{name:"ortofotoInfraroig2014",key:"ortofoto_infraroig_2014",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2014"},37:{name:"ortofotoInfraroig2013",key:"ortofoto_infraroig_2013",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2013"},38:{name:"ortofotoInfraroig2012",key:"ortofoto_infraroig_2012",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2012"},39:{name:"ortofotoInfraroig2011",key:"ortofoto_infraroig_2011",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2011"},40:{name:"ortofotoInfraroig2010",key:"ortofoto_infraroig_2010",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2010"},41:{name:"ortofotoInfraroig2009",key:"ortofoto_infraroig_2009",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2009"},42:{name:"ortofotoInfraroig2008",key:"ortofoto_infraroig_2008",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2008"},43:{name:"ortofotoInfraroig20062007",key:"ortofoto_infraroig_2006-2007",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2006-2007"},44:{name:"ortofotoInfraroig19961997",key:"ortofoto_infraroig_1996-1997",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_1996-1997"},45:{name:"ortofotoInfraroigSerieAnual",key:"ortofoto_infraroig_serie_anual",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_serie_anual"}},vectorLayersICGC:{0:{name:"agrupacionsCensals2015",key:"agrupacions_censals_2015"},1:{name:"agrupacionsCensals2016",key:"agrupacions_censals_2016"},2:{name:"agrupacionsCensals2017",key:"agrupacions_censals_2017"},3:{name:"agrupacionsCensals2018",key:"agrupacions_censals_2018"},4:{name:"agrupacionsCensals2019",key:"agrupacions_censals_2019"},5:{name:"agrupacionsCensals2020",key:"agrupacions_censals_2020"},6:{name:"agrupacionsCensals2021",key:"agrupacions_censals_2021"},7:{name:"agrupacionsCensalsVigent",key:"agrupacions_censals_vigent"},8:{name:"agrupacionsCensalsVigentText",key:"agrupacions_censals_vigent_text"},9:{name:"areesBasiquesPolicials2019",key:"arees_basiques_policials_2019"},10:{name:"areesBasiquesPolicials2020",key:"arees_basiques_policials_2020"},11:{name:"areesBasiquesPolicials2022",key:"arees_basiques_policials_2022"},12:{name:"areesBasiquesPolicialsVigent",key:"arees_basiques_policials_vigent"},13:{name:"areesBasiquesPolicialsVigentText",key:"arees_basiques_policials_vigent_text"},14:{name:"areesBasiquesSalutVigent",key:"arees_basiques_salut_vigent"},15:{name:"areesBasiquesServeisSocialsVigent",key:"arees_basiques_serveis_socials_vigent"},16:{name:"areesBasiquesServeisSocialsVigentText",key:"arees_basiques_serveis_socials_vigent_text"},17:{name:"areesGestioAssistencialVigent",key:"arees_gestio_assistencial_vigent"},18:{name:"areesHidrogeologiquesAquifersVigent",key:"arees_hidrogeologiques_aquifers_vigent"},19:{name:"catalunyaVigent",key:"catalunya_vigent"},20:{name:"catalunyaVigentText",key:"catalunya_vigent_text"},21:{name:"comarques2022",key:"comarques_2022"},22:{name:"comarquesVigent",key:"comarques_vigent"},23:{name:"comarquesVigentText",key:"comarques_vigent_text"},24:{name:"districtesCensals2015",key:"districtes_censals_2015"},25:{name:"districtesCensals2016",key:"districtes_censals_2016"},26:{name:"districtesCensals2017",key:"districtes_censals_2017"},27:{name:"districtesCensals2018",key:"districtes_censals_2018"},28:{name:"districtesCensals2019",key:"districtes_censals_2019"},29:{name:"districtesCensals2020",key:"districtes_censals_2020"},30:{name:"districtesCensals2021",key:"districtes_censals_2021"},31:{name:"districtesCensals2022",key:"districtes_censals_2022"},32:{name:"districtesCensalsVigent",key:"districtes_censals_vigent"},33:{name:"districtesCensalsVigentText",key:"districtes_censals_vigent_text"},34:{name:"incendisForestalsVigent",key:"incendis_forestals_vigent"},35:{name:"incendisForestalsVigentText",key:"incendis_forestals_vigent_text"},36:{name:"municipis2022",key:"municipis_2022"},37:{name:"municipis2022Text",key:"municipis_2022_text"},38:{name:"municipisVigent",key:"municipis_vigent"},39:{name:"municipisVigentText",key:"municipis_vigent_text"},40:{name:"partitsJudicialsVigent",key:"partits_judicials_vigent"},41:{name:"partitsJudicialsVigentText",key:"partits_judicials_vigent_text"},42:{name:"plaTerritorial2015",key:"pla_territorial_2015"},43:{name:"plaTerritorialVigent",key:"pla_territorial_vigent"},44:{name:"plaTerritorialVigentText",key:"pla_territorial_vigent_text"},45:{name:"provinciesVigent",key:"provincies_vigent"},46:{name:"provinciesVigentText",key:"provincies_vigent_text"},47:{name:"regionsPolicialsVigent",key:"regions_policials_vigent"},48:{name:"regionsPolicialsVigentText",key:"regions_policials_vigent_text"},49:{name:"regionsSanitariesVigent",key:"regions_sanitaries_vigent"},50:{name:"regionsSanitariesVigentText",key:"regions_sanitaries_vigent_text"},51:{name:"seccionsCensals2015",key:"seccions_censals_2015"},52:{name:"seccionsCensals2016",key:"seccions_censals_2016"},53:{name:"seccionsCensals2017",key:"seccions_censals_2017"},54:{name:"seccionsCensals2018",key:"seccions_censals_2018"},55:{name:"seccionsCensals2019",key:"seccions_censals_2019"},56:{name:"seccionsCensals2020",key:"seccions_censals_2020"},57:{name:"seccionsCensals2021",key:"seccions_censals_2021"},58:{name:"seccionsCensals2022",key:"seccions_censals_2022"},59:{name:"seccionsCensalsVigent",key:"seccions_censals_vigent"},60:{name:"seccionsCensalsVigentText",key:"seccions_censals_vigent_text"},61:{name:"sectorsSanitarisVigent",key:"sectors_sanitaris_vigent"},62:{name:"vegueriesVigent",key:"vegueries_vigent"},63:{name:"vegueriesVigentText",key:"vegueries_vigent_text"}},vectorLayers:{0:{key:"cobertes2018",url:"https://tilemaps.icgc.cat/tileserver/cobertes_tilejson.json",legend:"https://tilemaps.icgc.cat/cdn/images/llegendaCobertesSol2018.jpg"}},wmsLayers:{0:{key:"espaisInteresGeologic",layer:"",url:"https://geoserveis.icgc.cat/servei/catalunya/espais-interes-geologic/wms/service?&service=WMS&request=GetMap&layers=espais-interes-geologic&styles=&format=image%2Fpng&transparent=true&version=1.1.1&tipus=wms&width=512&height=512&srs=EPSG%3A3857&bbox={bbox-epsg-3857}"},1:{key:"gravimetriaBouguer500000",layer:"",url:"https://geoserveis.icgc.cat/servei/catalunya/gravimetria/wms/service?&service=WMS&request=GetMap&layers=anomalia_bouguer_500000&styles=&format=image%2Fpng&transparent=true&version=1.1.1&tipus=wms&width=512&height=512&srs=EPSG%3A3857&bbox={bbox-epsg-3857}"},2:{key:"cobertesSol2018",layer:"",url:"https://geoserveis.icgc.cat/servei/catalunya/cobertes-sol/wms/service?&service=WMS&request=GetMap&layers=cobertes_2018&styles=&format=image%2Fpng&transparent=true&version=1.1.1&tipus=wms&width=512&height=512&srs=EPSG%3A3857&bbox={bbox-epsg-3857}"},3:{key:"administratiu",layer:"",url:"http://geoserveis.icgc.cat/servei/catalunya/mapa-base/wmts/administratiu/MON3857NW/{z}/{x}/{y}.png"},4:{key:"simplificat",layer:"",url:"http://geoserveis.icgc.cat/servei/catalunya/mapa-base/wmts/simplificat/MON3857NW/{z}/{x}/{y}.png"},5:{key:"cims",layer:"",url:"https://geoserveis.icgc.cat/icc_100cims/wms/service?REQUEST=GetMap&SERVICE=WMS&VERSION=1.1.1&LAYERS=0&STYLES=&FORMAT=image/png&BGCOLOR=0xFFFFFF&TRANSPARENT=TRUE&SRS=EPSG:25831&BBOX=137118.923076923,4488408.75,650959.076923077,4749634.75&WIDTH=895&HEIGHT=455"},6:{key:"cobertesSol",layer:"",url:"http://geoserveis.icgc.cat/servei/catalunya/cobertes-sol/wms?REQUEST=GetMap&SERVICE=WMS&VERSION=1.3.0&LAYERS=cobertes_2009&STYLES=&FORMAT=image/png&BGCOLOR=0xFFFFFF&TRANSPARENT=TRUE&CRS=EPSG:25831&BBOX=374110.828167253,4639230.79853085,452621.120632226,4703578.45000215&WIDTH=1020&HEIGHT=836"}},fgbLayers:{0:{name:"agrupacionsCensalsVigent",key:"agrupacions_censals_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/agrupacions_censals_vigent.fgb"},1:{name:"agrupacionsCensalsVigentText",key:"agrupacions_censals_vigent_text",url:"https://tilemaps.icgc.cat/vector/fgb/agrupacions_censals_vigent_text.fgb"},2:{name:"areesBasiquesPolicialsVigent",key:"arees_basiques_policials_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/arees_basiques_policials_vigent.fgb"},3:{name:"areesBasiquesPolicialsVigentText",key:"arees_basiques_policials_vigent_text",url:"https://tilemaps.icgc.cat/vector/fgb/arees_basiques_policials_vigent_text.fgb"},4:{name:"areesBasiquesSalutVigent",key:"arees_basiques_salut_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/arees_basiques_salut_vigent.fgb"},5:{name:"areesBasiquesServeisSocialsVigent",key:"arees_basiques_serveis_socials_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/arees_basiques_serveis_socials_vigent.fgb"},6:{name:"areesBasiquesServeisSocialsVigentText",key:"arees_basiques_serveis_socials_vigent_text",url:"https://tilemaps.icgc.cat/vector/fgb/arees_basiques_serveis_socials_vigent_text.fgb"},7:{name:"areesGestioAssistencialVigent",key:"arees_gestio_assistencial_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/arees_gestio_assistencial_vigent.fgb"},8:{name:"areesHidrogeologiquesAquifersVigent",key:"arees_hidrogeologiques_aquifers_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/arees_hidrogeologiques_aquifers_vigent.fgb"},9:{name:"catalunyaVigent",key:"catalunya_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/catalunya_vigent.fgb"},10:{name:"catalunyaVigentText",key:"catalunya_vigent_text",url:"https://tilemaps.icgc.cat/vector/fgb/catalunya_vigent_text.fgb"},11:{name:"comarquesVigent",key:"comarques_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/comarques_vigent.fgb"},12:{name:"comarquesVigentText",key:"comarques_vigent_text",url:"https://tilemaps.icgc.cat/vector/fgb/comarques_vigent_text.fgb"},13:{name:"districtesCensalsVigent",key:"districtes_censals_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/districtes_censals_vigent.fgb"},14:{name:"districtesCensalsVigentText",key:"districtes_censals_vigent_text",url:"https://tilemaps.icgc.cat/vector/fgb/districtes_censals_vigent_text.fgb"},15:{name:"incendisForestalsVigent",key:"incendis_forestals_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/incendis_forestals_vigent.fgb"},16:{name:"incendisForestalsVigentText",key:"incendis_forestals_vigent_text",url:"https://tilemaps.icgc.cat/vector/fgb/incendis_forestals_vigent_text.fgb"},17:{name:"municipisVigent",key:"municipis_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/municipis_vigent.fgb"},18:{name:"municipisVigentText",key:"municipis_vigent_text",url:"https://tilemaps.icgc.cat/vector/fgb/municipis_vigent_text.fgb"},19:{name:"partitsJudicialsVigent",key:"partits_judicials_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/partits_judicials_vigent.fgb"},20:{name:"partitsJudicialsVigentText",key:"partits_judicials_vigent_text",url:"https://tilemaps.icgc.cat/vector/fgb/partits_judicials_vigent_text.fgb"},21:{name:"plaTerritorialVigent",key:"pla_territorial_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/pla_territorial_vigent.fgb"},22:{name:"plaTerritorialVigentText",key:"pla_territorial_vigent_text",url:"https://tilemaps.icgc.cat/vector/fgb/pla_territorial_vigent_text.fgb"},23:{name:"provinciesVigent",key:"provincies_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/provincies_vigent.fgb"},24:{name:"provinciesVigentText",key:"provincies_vigent_text",url:"https://tilemaps.icgc.cat/vector/fgb/provincies_vigent_text.fgb"},25:{name:"regionsPolicialsVigent",key:"regions_policials_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/regions_policials_vigent.fgb"},26:{name:"regionsPolicialsVigentText",key:"regions_policials_vigent_text",url:"https://tilemaps.icgc.cat/vector/fgb/regions_policials_vigent_text.fgb"},27:{name:"regionsSanitariesVigent",key:"regions_sanitaries_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/regions_sanitaries_vigent.fgb"},28:{name:"regionsSanitariesVigentText",key:"regions_sanitaries_vigent_text",url:"https://tilemaps.icgc.cat/vector/fgb/regions_sanitaries_vigent_text.fgb"},29:{name:"seccionsCensalsVigent",key:"seccions_censals_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/seccions_censals_vigent.fgb"},30:{name:"seccionsCensalsVigentText",key:"seccions_censals_vigent_text",url:"https://tilemaps.icgc.cat/vector/fgb/seccions_censals_vigent_text.fgb"},31:{name:"sectorsSanitarisVigent",key:"sectors_sanitaris_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/sectors_sanitaris_vigent.fgb"},32:{name:"vegueriesVigent",key:"vegueries_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/vegueries_vigent.fgb"},33:{name:"vegueriesVigentText",key:"vegueries_vigent_text",url:"https://tilemaps.icgc.cat/vector/fgb/vegueries_vigent_text.fgb"}}};let jre=class{constructor(e){this.initTheMap(e)}initTheMap(e){if(!e)e=Hn.mapOptions;else for(const t in Hn.mapOptions){let n=[Hn.mapOptions.center[0],Hn.mapOptions.center[1]];Hn.mapOptions.center=n,e.hasOwnProperty(t)||(e[t]=Hn.mapOptions[t])}e.maxPitch=85,e.maplibreLogo=!1,e.attributionControl=!1,this.map=new Ts.Map(e),this.map.options=e,this.map.addControl(new Ts.AttributionControl({compact:!0})),this.map.on("load",async()=>{const t=this.map.getStyle().name,n=this.map.options.style;if(window.document.querySelector(".maplibregl-compact-show")){var i=window.document.querySelector(".maplibregl-compact-show");i.classList.remove("maplibregl-compact-show")}this.map.addControl(new Hre({color:n.indexOf("orto")===-1,defaultOptions:Hn}),"bottom-left"),this._dealOrto3dStyle(t)})}addGeocoderICGC(e){try{e===void 0&&(e="top-right");let t={collapsed:!0,marker:!0,popup:!0,showResultMarkers:!0,maplibregl:Ts,showResultsWhileTyping:!0,minLength:2};const n={forwardGeocode:async s=>{const a=[];try{const o=Hn.geocoder.peliasUrl1+encodeURIComponent(s.query)+Hn.geocoder.peliasUrl2,f=await(await fetch(o)).json();for(const m of f.features){const v=m.geometry.coordinates,x={type:"Feature",geometry:{type:"Point",coordinates:v},place_name:m.properties.label,properties:m.properties,text:m.properties.label,place_type:["place"],center:v};a.push(x)}}catch(o){console.error(`Failed to forwardGeocode with error: ${o}`)}return{features:a}}};this.map.addControl(new Qre(n,t),e);let i=document.getElementsByClassName("maplibregl-ctrl-geocoder--input");i[0].attributes[2].nodeValue="Cerca...",i[0].addEventListener("input",function(s){s.target.value.length>3})}catch(t){console.error(`Error adding ICGC geocoder: ${t.message}`)}}getStyle(){try{return this.map.getStyle()}catch(e){console.error(`Error getting style: ${e.message}`)}}async loadImage(e){try{return this.map.loadImage(e)}catch(t){console.error(`Error getting loadImage: ${t.message}`)}}addImage(e,t){try{return this.map.addImage(e,t)}catch(n){console.error(`Error getting addImage: ${n.message}`)}}getConfigStyles(){try{let e=[];for(const t of Sf)e.push(t.name);return e}catch(e){console.error(`Error retrieving base styles: ${e.message}`)}}getConfigWMSLayers(){try{let e=[];for(const t in Ti.WMS)Ti.WMS.hasOwnProperty(t)&&e.push(t);return e}catch(e){console.error(`Error retrieving WMS layers: ${e.message}`)}}getConfigOrtoLayers(){try{let e=[];for(const t in Ti.Orto)Ti.Orto.hasOwnProperty(t)&&e.push(t);return e}catch(e){console.error(`Error retrieving orto image layers: ${e.message}`)}}getConfigVectorLayers(){try{let e=[];for(const t in Ti.Vector)Ti.Vector.hasOwnProperty(t)&&e.push(t);return e}catch(e){console.error(`Error retrieving vector layers: ${e.message}`)}}getConfigVectorAdminLayers(){try{let e=[];for(const t in Ti.VectorAdmin)Ti.VectorAdmin.hasOwnProperty(t)&&e.push(t);return e}catch(e){console.error(`Error retrieving vectorAdmin layers: ${e.message}`)}}getConfigFGBAdminLayers(){try{let e=[];for(const t in Ti.FGBAdmin)Ti.FGBAdmin.hasOwnProperty(t)&&e.push(t);return e}catch(e){console.error(`Error retrieving FGBAdmin layers: ${e.message}`)}}async fetchData(e,t,n,i){try{if(e.includes(".fgb"))this.addFGBLayerICGC(e,n,null,i);else{const a=await(await fetch(e)).json();let o=t,A="";n==="labels"&&(A=this._firstSymbolLayer()),n==="lines"&&(A=this._firstLineLayer());let f=a.features[0].geometry.type;f.includes("ine")&&(i!==void 0?map.addLayer({id:o,type:"line",source:{type:"geojson",data:a},layout:{visibility:"visible"},paint:i},A):map.addLayer({id:o,type:"line",source:{type:"geojson",data:a},layout:{visibility:"visible"},paint:{"line-color":"black","line-width":2,"line-opacity":1}},A)),f.includes("olygon")&&(i!==void 0?map.addLayer({id:o,type:"fill",source:{type:"geojson",data:a},layout:{visibility:"visible"},paint:i},A):map.addLayer({id:o,type:"fill",source:{type:"geojson",data:a},layout:{visibility:"visible"},paint:{"fill-color":"blue","fill-opacity":.6}},A)),f.includes("oint")&&(i!==void 0?map.addLayer({id:o,type:"circle",source:{type:"geojson",data:a},layout:{visibility:"visible"},paint:i},A):map.addLayer({id:o,type:"circle",source:{type:"geojson",data:a},layout:{visibility:"visible"},paint:{"circle-color":"red","circle-opacity":.85}},A))}}catch(s){console.error(`Error fetching data: ${s.message}`)}}async fetchDataAndMenu(e,t,n,i,s){try{const a=document.getElementById("menu-group");let o="visible",A="";i==="labels"&&(A=this._firstSymbolLayer()),i==="lines"&&(A=this._firstLineLayer());let f;if(e.includes(".fgb")){let x=function(Q){for(const N in Ti.FGBAdmin)if(Ti.FGBAdmin.hasOwnProperty(N)&&Ti.FGBAdmin[N]===Q)return N;return null}(e);x===null&&(x="userFGB");const C=await fetch(e),M={type:"FeatureCollection",features:[]};for await(const Q of YE(C.body))M.features.push(Q);f=M;let U=x;if(this.map.addSource(U,{type:"geojson",data:M}),e.includes("text"))this.map.addLayer({id:x,type:"symbol",source:U,layout:{"text-letter-spacing":.1,"text-size":{base:1.2,stops:[[8,0],[12,14],[15,15]]},"text-font":["FiraSans-Regular"],"text-field":["get","NOM_AC"],"text-transform":"none","text-max-width":25,visibility:o,"text-justify":"right","text-anchor":"top","text-allow-overlap":!1,"symbol-spacing":2,"text-line-height":1},paint:{"text-halo-blur":.5,"text-color":"rgba(90, 7, 7, 1)","text-halo-width":2,"text-halo-color":"rgba(255, 255, 255,0.8)"}},A);else{let Q=x+"Text";this.map.addLayer({id:Q,type:"symbol",source:U,layout:{"text-letter-spacing":.1,"text-size":{base:1.2,stops:[[8,0],[12,14],[15,15]]},"text-font":["FiraSans-Regular"],"text-field":["get","NOM_AC"],"text-transform":"none","text-max-width":25,visibility:o,"text-justify":"right","text-anchor":"top","text-allow-overlap":!1,"symbol-spacing":2,"text-line-height":1},paint:{"text-halo-blur":.5,"text-color":"rgba(90, 7, 7, 1)","text-halo-width":2,"text-halo-color":"rgba(255, 255, 255,0.8)"}},A)}}else f=await(await fetch(e)).json();if(n!=="all"){const v=document.createElement("div");v.id="titleDivMenu",v.textContent=t,a.appendChild(v);const x=document.createElement("div");x.id="titleDivMenuSub",x.textContent=`📂 ${n}`,a.appendChild(x)}let m=f.features[0].geometry.type;if(n==="all")m.includes("ine")&&(s!==void 0?map.addLayer({id:t,type:"line",source:{type:"geojson",data:f},layout:{visibility:"visible"},paint:s},A):map.addLayer({id:t,type:"line",source:{type:"geojson",data:f},layout:{visibility:"visible"},paint:{"line-color":"black","line-width":2,"line-opacity":1}},A)),m.includes("olygon")&&(s!==void 0?this.map.addLayer({id:t,type:"fill",source:{type:"geojson",data:f},layout:{visibility:"visible"},paint:s},A):this.map.addLayer({id:t,type:"fill",source:{type:"geojson",data:f},layout:{visibility:"visible"},paint:{"fill-color":"#0000FF","fill-opacity":0}},A)),m.includes("oint")&&(s!==void 0?map.addLayer({id:t,type:"circle",source:{type:"geojson",data:f},layout:{visibility:"visible"},paint:s},A):map.addLayer({id:t,type:"circle",source:{type:"geojson",data:f},layout:{visibility:"visible"},paint:{"circle-color":"red","circle-opacity":.85}},A)),map.addMenuItem(t);else{let v=n;const x={};f.features.forEach(C=>{const M=C.properties[v],U=M+"-userFieldFilter-"+t;M!==null&&(x[U]||(m.includes("ine")&&(s!==void 0?map.addLayer({id:U,type:"line",source:{type:"geojson",data:f},layout:{visibility:"visible"},filter:["==",`${v}`,M],paint:s},A):map.addLayer({id:U,type:"line",source:{type:"geojson",data:f},layout:{visibility:"visible"},filter:["==",`${v}`,M],paint:{"line-color":"black","line-width":2,"line-opacity":1}},A)),m.includes("olygon")&&(s!==void 0?map.addLayer({id:U,type:"fill",source:{type:"geojson",data:f},layout:{visibility:"visible"},filter:["==",`${v}`,M],paint:s},A):map.addLayer({id:U,type:"fill",source:{type:"geojson",data:f},layout:{visibility:"visible"},filter:["==",`${v}`,M],paint:{"fill-color":"blue","fill-opacity":.6}},A)),m.includes("oint")&&(s!==void 0?map.addLayer({id:U,type:"circle",source:{type:"geojson",data:f},layout:{visibility:"visible"},filter:["==",`${v}`,M],paint:s},A):map.addLayer({id:U,type:"circle",source:{type:"geojson",data:f},layout:{visibility:"visible"},filter:["==",`${v}`,M],paint:{"circle-color":"red","circle-opacity":.85}},A)),x[U]=!0,map.addMenuItem(U)))})}}catch(a){console.error(`Error fetching data: ${a.message}`)}}on(e,t){setTimeout(()=>{try{this.map.on(e,t)}catch(n){console.error(`Error adding event ON listener: ${n.message}`)}},500)}getSource(e){try{return this.map.getSource(e)}catch(t){console.error(`Error getting source: ${t.message}`)}}addSource(e,t){try{this.map.addSource(e,t)}catch(n){console.error(`Error adding source: ${n.message}`)}}setStyle(e,t){try{t!==void 0?this.map.setStyle(e,t):this.map.setStyle(e),this.map.on("styledata",()=>{if(window.document.querySelector(".maplibregl-compact-show")){var n=window.document.querySelector(".maplibregl-compact-show");n.classList.remove("maplibregl-compact-show")}this._dealOrto3dStyle(this.map.getStyle().name)})}catch(n){console.error(`Error setting style: ${n.message}`)}}getLayer(e){try{return this.map.getLayer(e)}catch(t){console.error(`Error getting layer: ${t.message}`)}}setFilter(e,t,n){try{return this.map.setFilter(e,t,n)}catch(i){console.error(`Error setting filter: ${i.message}`)}}jumpTo(e){try{this.map.jumpTo(e)}catch(t){console.error(`Error jumping to ${e}: ${t.message}`)}}setLayoutProperty(e,t,n){try{this.map.setLayoutProperty(e,t,n)}catch(i){console.error(`Error setting layout property: ${i.message}`)}}setPaintProperty(e,t,n){try{this.map.setPaintProperty(e,t,n)}catch(i){console.error(`Error setting paint property: ${i.message}`)}}addControl(e,t){try{t===void 0&&(t="top-right"),this.map.addControl(e,t)}catch(n){console.error(`Error adding control: ${n.message}`)}}getZoom(){try{return this.map.getZoom()}catch(e){console.error(`Error getting zoom level: ${e.message}`)}}addMouseCoordControl(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"bottom-left";try{this.map.addControl(new Vre(e),t)}catch(n){console.error(`Error adding mouse coordinate control: ${n.message}`)}}addGeolocateControl(e,t){try{t===void 0&&(t="top-right"),e===void 0?this.map.addControl(new Ts.GeolocateControl({positionOptions:{enableHighAccuracy:!0},trackUserLocation:!0}),t):this.map.addControl(new Ts.GeolocateControl(e),t)}catch(n){console.error(`Error adding geolocate control: ${n.message}`)}}addFullscreenControl(e,t){try{t===void 0&&(t="top-right"),e===void 0?this.map.addControl(new Ts.FullscreenControl({container:HTMLElement}),t):this.map.addControl(new Ts.FullscreenControl(e),t)}catch(n){console.error(`Error adding fullscreen control: ${n.message}`)}}getBounds(){try{return this.map.getBounds()}catch(e){console.error(`Error getting bounds: ${e.message}`)}}getCenter(){try{return this.map.getCenter()}catch(e){console.error(`Error getting center: ${e.message}`)}}setTerrain(e){try{return this.map.setTerrain(e)}catch(t){console.error(`Error setting terrain: ${t.message}`)}}setLayerZoomRange(e,t,n){try{return this.map.setLayerZoomRange(e,t,n)}catch(i){console.error(`Error setting terrain: ${i.message}`)}}getCanvas(){try{return this.map.getCanvas()}catch(e){console.error(`Error getting canvas: ${e.message}`)}}setCenter(e){try{return this.map.setCenter(e)}catch(t){console.error(`Error setting center: ${t.message}`)}}addLayer(e,t){try{this.map.addLayer(e,t)}catch(n){console.error(`Error adding layer: ${n.message}`)}}addLayerGeoJSON(e,t){try{let n="";t==="labels"&&(n=this._firstSymbolLayer()),t==="lines"&&(n=this._firstLineLayer()),this.map.addSource(`${e.id}`,{type:"geojson",data:e.data}),this.map.addLayer({id:`${e.id}-layerIcgcMap`,type:e.layerType,source:`${e.id}`,layout:e.layout,paint:e.paint},n)}catch(n){console.error(`Error adding GeoJSON layer: ${n.message}`)}}addLayerWMS(e,t){try{let n="";t==="labels"&&(n=this._firstSymbolLayer()),t==="lines"&&(n=this._firstLineLayer()),this.map.addSource(`${e.id}`,{type:"raster",tiles:[e.tiles],tileSize:256},n),this.map.addLayer({id:`${e.id}-layerIcgcMap`,type:"raster",source:`${e.id}`,paint:{}},n)}catch(n){console.error(`Error adding WMS layer: ${n.message}`)}}removeControl(e){try{this.map.removeControl(e)}catch(t){console.error(`Error removing control: ${t.message}`)}}removeLayer(e){try{this.map.removeLayer(e)}catch(t){console.error(`Error removing layer: ${t.message}`)}}removeSource(e){try{this.map.removeSource(e)}catch(t){console.error(`Error removing source: ${t.message}`)}}addLogo(e,t){try{const n=document.createElement("img");n.src=e.url,n.style.height=e.height;const i=document.getElementById("logos"),s=document.createElement("a");s.id=e.id,s.href=e.href,s.target="_blank",s.style.position="relative",s.style.bottom="1px",s.appendChild(n),i.appendChild(s)}catch(n){console.error(`Error adding logo: ${n.message}`)}}addBasemapsICGC(e){try{const t=i=>{map.setStyle(i)},n=document.getElementById("basemap-group");for(const i of e)for(const s of Object.keys(Hn.baseStyles)){const a=Hn.baseStyles[s];if(i===a.url){const o=document.createElement("div");o.className="basemap-item",o.title=a.key,o.style.backgroundImage=`url('${a.image}')`,n.appendChild(o),o.addEventListener("click",()=>t(a.url))}}}catch(t){console.error(`Error adding basemaps: ${t.message}`)}}addBasemaps(e){try{const t=i=>{map.setStyle(i.url)},n=document.getElementById("basemap-group");e.forEach(i=>{const s=document.createElement("div");s.className="basemap-item",s.title=i.label,s.style.backgroundImage=`url('${i.image}')`,n.appendChild(s),s.addEventListener("click",()=>t(i))})}catch(t){console.error(`Error adding basemaps: ${t.message}`)}}addFeatureQuery(e,t,n){try{let i;this.map.on("mouseenter",e,()=>{this.map.getCanvas().style.cursor="pointer"}),this.map.on("mouseleave",e,()=>{this.map.getCanvas().style.cursor=""}),this.map.on("click",s=>{let a=this.map.queryRenderedFeatures(s.point);if(a&&a[0].source.includes(e)){let o=[s.lngLat.lng,s.lngLat.lat];if(t!==void 0&&t.length>0&&t!=="all"){if(t!==null){let A="";t.forEach(f=>{let m=a[0].properties[f];A=A+`<h4>${m}</h4>`}),i=A,map.addPopup(o,i,n)}}else{let A="";for(const f in a[0].properties)A+="<b>"+f+"</b>:"+a[0].properties[f]+"<br>";i=A,map.addPopup(o,i,n)}}})}catch(i){console.error(`Error adding feature query: ${i.message}`)}}addScaleControl(e,t){try{var n=new Ts.ScaleControl(e);this.map.addControl(n,t)}catch(i){console.error(`Error adding scale: ${i.message}`)}}addExportControl(e,t){try{typeof e=="string"&&(t=e,e=void 0),e===void 0&&(e={PageSize:Hh.A4,PageOrientation:Bg.Landscape,Format:Ru.PNG,DPI:t2[300],Crosshair:!0,PrintableArea:!0},t="top-right"),map.addControl(new Xte(e),t)}catch(n){console.error(`Error adding export control: ${n.message}`)}}addPopup(e,t){try{new Ts.Popup().setLngLat(e).setHTML(t).addTo(this.map)}catch{}}addMarker(e){try{let t,n;return e.text===void 0?t=new Ts.Marker(e.options).setLngLat(e.coord).addTo(this.map):(n=new Ts.Popup({offset:e.textOffset}).setText(e.text),t=new Ts.Marker().setLngLat(e.coord).setPopup(n).addTo(this.map)),t}catch(t){return console.error(`Error adding marker: ${t.message}`),null}}addPopup(e,t,n){try{return n.image===void 0?new Ts.Popup().setLngLat(e).setHTML(`
|
|
2577
|
+
</svg>`,o=document.createElement("a");o.href=`data:application/xml,${encodeURIComponent(a)}`,o.download=t,o.click(),o.remove()}toPixels(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:96;return this.unit===pf.mm&&(t/=25.4),`${t*e}px`}},$te=class extends Wte{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Hh.A4,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:300,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:Ru.PNG,s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:pf.mm,a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:"map",o=arguments.length>6&&arguments[6]!==void 0?arguments[6]:x2;super(e,t,n,i,s,a,"maplibregl-marker",o)}getRenderedMap(e,t){const n=new zE.Map({container:e,style:t,center:this.map.getCenter(),zoom:this.map.getZoom(),bearing:this.map.getBearing(),pitch:this.map.getPitch(),interactive:!1,preserveDrawingBuffer:!0,fadeDuration:0,attributionControl:!1,transformRequest:this.map._requestManager._transformRequestFn});this.map.getTerrain()&&(n.setMaxPitch(85),n.setPitch(this.map.getPitch()));const i=(this.map.style.imageManager||{}).images||[];return Object.keys(i).forEach(s=>{n.addImage(s,i[s].data)}),n}renderMapPost(e){const t=this.map.getTerrain();return t&&e.setTerrain({source:t.source,exaggeration:t.exaggeration}),e}},Xte=class{constructor(e){jn(this,"controlContainer"),jn(this,"exportContainer"),jn(this,"crosshair"),jn(this,"printableArea"),jn(this,"map"),jn(this,"exportButton"),jn(this,"options",{PageSize:Hh.A4,PageOrientation:Bg.Landscape,Format:Ru.PDF,DPI:t2[300],Crosshair:!1,PrintableArea:!1,Local:"en",AllowedSizes:Object.keys(Hh),Filename:"map",markerCirclePaint:x2}),jn(this,"MAPLIB_CSS_PREFIX","maplibregl"),e&&(this.options=Object.assign(this.options,e)),this.onDocumentClick=this.onDocumentClick.bind(this)}getDefaultPosition(){return"top-right"}getTranslation(){const e=this.options.Local??"en";return Xee(e)}onAdd(e){var t;this.map=e,this.controlContainer=document.createElement("div"),this.controlContainer.classList.add(`${this.MAPLIB_CSS_PREFIX}-ctrl`),this.controlContainer.classList.add(`${this.MAPLIB_CSS_PREFIX}-ctrl-group`),this.exportContainer=document.createElement("div"),this.exportContainer.classList.add(`${this.MAPLIB_CSS_PREFIX}-export-list`),this.exportButton=document.createElement("button"),this.exportButton.classList.add(`${this.MAPLIB_CSS_PREFIX}-ctrl-icon`),this.exportButton.classList.add(`${this.MAPLIB_CSS_PREFIX}-export-control`),this.exportButton.type="button",this.exportButton.addEventListener("click",()=>{this.exportButton.style.display="none",this.exportContainer.style.display="block",this.toggleCrosshair(!0),this.togglePrintableArea(!0)}),document.addEventListener("click",this.onDocumentClick),this.controlContainer.appendChild(this.exportButton),this.controlContainer.appendChild(this.exportContainer);const n=document.createElement("TABLE");n.className="print-table";const i={};(t=this.options.AllowedSizes)==null||t.forEach(m=>{Hh[m]&&(i[m]=Hh[m])});const s=this.createSelection(i,this.getTranslation().PageSize,"page-size",this.options.PageSize,(m,v)=>JSON.stringify(m[v]));n.appendChild(s);const a=this.createSelection(Bg,this.getTranslation().PageOrientation,"page-orientation",this.options.PageOrientation,(m,v)=>m[v]);n.appendChild(a);const o=this.createSelection(Ru,this.getTranslation().Format,"format-type",this.options.Format,(m,v)=>m[v]);n.appendChild(o);const A=this.createSelection(t2,this.getTranslation().DPI,"dpi-type",this.options.DPI,(m,v)=>m[v]);n.appendChild(A),this.exportContainer.appendChild(n);const f=document.createElement("button");return f.type="button",f.textContent=this.getTranslation().Generate,f.classList.add("generate-button"),f.addEventListener("click",()=>{const m=document.getElementById("mapbox-gl-export-page-size"),v=document.getElementById("mapbox-gl-export-page-orientation"),x=document.getElementById("mapbox-gl-export-format-type"),C=document.getElementById("mapbox-gl-export-dpi-type"),M=v.value;let U=JSON.parse(m.value);M===Bg.Portrait&&(U=U.reverse()),this.generateMap(e,U,Number(C.value),x.value,pf.mm,this.options.Filename)}),this.exportContainer.appendChild(f),this.controlContainer}generateMap(e,t,n,i,s,a){new $te(e,t,n,i,s,a,this.options.markerCirclePaint).generate()}createSelection(e,t,n,i,s){const a=document.createElement("label");a.textContent=t;const o=document.createElement("select");o.setAttribute("id",`mapbox-gl-export-${n}`),o.style.width="100%",Object.keys(e).forEach(v=>{const x=document.createElement("option");x.setAttribute("value",s(e,v)),x.appendChild(document.createTextNode(v)),x.setAttribute("name",n),i===e[v]&&(x.selected=!0),o.appendChild(x)}),o.addEventListener("change",()=>{this.updatePrintableArea()});const A=document.createElement("TR"),f=document.createElement("TD"),m=document.createElement("TD");return f.appendChild(a),m.appendChild(o),A.appendChild(f),A.appendChild(m),A}onRemove(){!this.controlContainer||!this.controlContainer.parentNode||!this.map||!this.exportButton||(this.exportButton.removeEventListener("click",this.onDocumentClick),this.controlContainer.parentNode.removeChild(this.controlContainer),document.removeEventListener("click",this.onDocumentClick),this.crosshair!==void 0&&(this.crosshair.destroy(),this.crosshair=void 0),this.printableArea!==void 0&&(this.printableArea.destroy(),this.printableArea=void 0),this.map=void 0)}onDocumentClick(e){this.controlContainer&&!this.controlContainer.contains(e.target)&&this.exportContainer&&this.exportButton&&(this.exportContainer.style.display="none",this.exportButton.style.display="block",this.toggleCrosshair(!1),this.togglePrintableArea(!1))}toggleCrosshair(e){this.options.Crosshair===!0&&(e===!1?this.crosshair!==void 0&&(this.crosshair.destroy(),this.crosshair=void 0):(this.crosshair=new kee(this.map),this.crosshair.create()))}togglePrintableArea(e){this.options.PrintableArea===!0&&(e===!1?this.printableArea!==void 0&&(this.printableArea.destroy(),this.printableArea=void 0):(this.printableArea=new Nee(this.map),this.updatePrintableArea()))}updatePrintableArea(){if(this.printableArea===void 0)return;const e=document.getElementById("mapbox-gl-export-page-size"),t=document.getElementById("mapbox-gl-export-page-orientation").value;let n=JSON.parse(e.value);t===Bg.Portrait&&(n=n.reverse()),this.printableArea.updateArea(n[0],n[1])}};var e4=Yte,Jte=Object.prototype.hasOwnProperty;function Yte(){for(var r={},e=0;e<arguments.length;e++){var t=arguments[e];for(var n in t)Jte.call(t,n)&&(r[n]=t[n])}return r}var t4={exports:{}};(function(r,e){(function(){var t={};r.exports=t,t.simpleFilter=function(n,i){return i.filter(function(s){return t.test(n,s)})},t.test=function(n,i){return t.match(n,i)!==null},t.match=function(n,i,s){s=s||{};var a=0,o=[],A=i.length,f=0,m=0,v=s.pre||"",x=s.post||"",C=s.caseSensitive&&i||i.toLowerCase(),M;n=s.caseSensitive&&n||n.toLowerCase();for(var U=0;U<A;U++)M=i[U],C[U]===n[a]?(M=v+M+x,a+=1,m+=1+m):m=0,f+=m,o[o.length]=M;return a===n.length?(f=C===n?1/0:f,{rendered:o.join(""),score:f}):null},t.filter=function(n,i,s){return!i||i.length===0?[]:typeof n!="string"?i:(s=s||{},i.reduce(function(a,o,A,f){var m=o;s.extract&&(m=s.extract(o));var v=t.match(n,m,s);return v!=null&&(a[a.length]={string:v.rendered,score:v.score,index:A,original:o}),a},[]).sort(function(a,o){var A=o.score-a.score;return A||a.index-o.index}))}})()})(t4);var Zte=t4.exports,ha=function(r){return this.component=r,this.items=[],this.active=r.options.noInitialSelection?-1:0,this.wrapper=document.createElement("div"),this.wrapper.className="suggestions-wrapper",this.element=document.createElement("ul"),this.element.className="suggestions",this.wrapper.appendChild(this.element),this.selectingListItem=!1,r.el.parentNode.insertBefore(this.wrapper,r.el.nextSibling),this};ha.prototype.show=function(){this.element.style.display="block"},ha.prototype.hide=function(){this.element.style.display="none"},ha.prototype.add=function(r){this.items.push(r)},ha.prototype.clear=function(){this.items=[],this.active=this.component.options.noInitialSelection?-1:0},ha.prototype.isEmpty=function(){return!this.items.length},ha.prototype.isVisible=function(){return this.element.style.display==="block"},ha.prototype.draw=function(){if(this.element.innerHTML="",this.items.length===0){this.hide();return}for(var r=0;r<this.items.length;r++)this.drawItem(this.items[r],this.active===r);this.show()},ha.prototype.drawItem=function(r,e){var t=document.createElement("li"),n=document.createElement("a");e&&(t.className+=" active"),n.innerHTML=r.string,t.appendChild(n),this.element.appendChild(t),t.addEventListener("mousedown",(function(){this.selectingListItem=!0}).bind(this)),t.addEventListener("mouseup",(function(){this.handleMouseUp.call(this,r)}).bind(this))},ha.prototype.handleMouseUp=function(r){this.selectingListItem=!1,this.component.value(r.original),this.clear(),this.draw()},ha.prototype.move=function(r){this.active=r,this.draw()},ha.prototype.previous=function(){this.move(this.active<=0?this.items.length-1:this.active-1)},ha.prototype.next=function(){this.move(this.active>=this.items.length-1?0:this.active+1)},ha.prototype.drawError=function(r){var e=document.createElement("li");e.innerHTML=r,this.element.appendChild(e),this.show()};var ere=ha,tre=e4,rre=Zte,nre=ere,go=function(r,e,t){return t=t||{},this.options=tre({minLength:2,limit:5,filter:!0,hideOnBlur:!0,noInitialSelection:!0},t),this.el=r,this.data=e||[],this.list=new nre(this),this.query="",this.selected=null,this.list.draw(),this.el.addEventListener("keyup",(function(n){this.handleKeyUp(n.keyCode,n)}).bind(this),!1),this.el.addEventListener("keydown",(function(n){this.handleKeyDown(n)}).bind(this)),this.el.addEventListener("focus",(function(){this.handleFocus()}).bind(this)),this.el.addEventListener("blur",(function(){this.handleBlur()}).bind(this)),this.el.addEventListener("paste",(function(n){this.handlePaste(n)}).bind(this)),this.render=this.options.render?this.options.render.bind(this):this.render.bind(this),this.getItemValue=this.options.getItemValue?this.options.getItemValue.bind(this):this.getItemValue.bind(this),this};go.prototype.handleKeyUp=function(r,e){if(!(r===40||r===38||r===27||r===9)){if(r===13){this.list.items[this.list.active]&&(this.list.handleMouseUp(this.list.items[this.list.active]),e.stopPropagation());return}this.handleInputChange(this.el.value)}},go.prototype.handleKeyDown=function(r){switch(r.keyCode){case 13:this.list.active>=0&&(this.list.selectingListItem=!0);break;case 9:this.list.isEmpty()||(this.list.isVisible()&&r.preventDefault(),this.value(this.list.active>=0?this.list.items[this.list.active].original:null),this.list.hide());break;case 27:this.list.isEmpty()||this.list.hide();break;case 38:this.list.previous();break;case 40:this.list.next();break}},go.prototype.handleBlur=function(){!this.list.selectingListItem&&this.options.hideOnBlur&&this.list.hide()},go.prototype.handlePaste=function(r){if(r.clipboardData)this.handleInputChange(r.clipboardData.getData("Text"));else{var e=this;setTimeout(function(){e.handleInputChange(r.target.value)},100)}},go.prototype.handleInputChange=function(r){if(this.query=this.normalize(r),this.list.clear(),this.query.length<this.options.minLength){this.list.draw();return}this.getCandidates((function(e){for(var t=0;t<e.length&&(this.list.add(e[t]),t!==this.options.limit-1);t++);this.list.draw()}).bind(this))},go.prototype.handleFocus=function(){this.list.isEmpty()||this.list.show(),this.list.selectingListItem=!1},go.prototype.update=function(r){this.data=r,this.handleKeyUp()},go.prototype.clear=function(){this.data=[],this.list.clear()},go.prototype.normalize=function(r){return r=r.toLowerCase(),r},go.prototype.match=function(r,e){return r.indexOf(e)>-1},go.prototype.value=function(r){if(this.selected=r,this.el.value=this.getItemValue(r||{place_name:this.query}),document.createEvent){var e=document.createEvent("HTMLEvents");e.initEvent("change",!0,!1),this.el.dispatchEvent(e)}else this.el.fireEvent("onchange")},go.prototype.getCandidates=function(r){var e={pre:"<strong>",post:"</strong>",extract:(function(n){return this.getItemValue(n)}).bind(this)},t;this.options.filter?(t=rre.filter(this.query,this.data,e),t=t.map((function(n){return{original:n.original,string:this.render(n.original,n.string)}}).bind(this))):t=this.data.map((function(n){var i=this.render(n);return{original:n,string:i}}).bind(this)),r(t)},go.prototype.getItemValue=function(r){return r},go.prototype.render=function(r,e){if(e)return e;for(var t=r.original?this.getItemValue(r.original):this.getItemValue(r),n=this.normalize(t),i=n.lastIndexOf(this.query);i>-1;){var s=i+this.query.length;t=t.slice(0,i)+"<strong>"+t.slice(i,s)+"</strong>"+t.slice(s),i=n.slice(0,i).lastIndexOf(this.query)}return t},go.prototype.renderError=function(r){this.list.drawError(r)};var ire=go,r4=ire,sre=r4;typeof window<"u"&&(window.Suggestions=r4);var ore="Expected a function",n4=NaN,are="[object Symbol]",cre=/^\s+|\s+$/g,lre=/^[-+]0x[0-9a-f]+$/i,ure=/^0b[01]+$/i,Are=/^0o[0-7]+$/i,hre=parseInt,dre=typeof Fd=="object"&&Fd&&Fd.Object===Object&&Fd,fre=typeof self=="object"&&self&&self.Object===Object&&self,pre=dre||fre||Function("return this")(),gre=Object.prototype,mre=gre.toString,yre=Math.max,_re=Math.min,B2=function(){return pre.Date.now()};function vre(r,e,t){var n,i,s,a,o,A,f=0,m=!1,v=!1,x=!0;if(typeof r!="function")throw new TypeError(ore);e=i4(e)||0,C2(t)&&(m=!!t.leading,v="maxWait"in t,s=v?yre(i4(t.maxWait)||0,e):s,x="trailing"in t?!!t.trailing:x);function C(ge){var ye=n,fe=i;return n=i=void 0,f=ge,a=r.apply(fe,ye),a}function M(ge){return f=ge,o=setTimeout(N,e),m?C(ge):a}function U(ge){var ye=ge-A,fe=ge-f,Oe=e-ye;return v?_re(Oe,s-fe):Oe}function Q(ge){var ye=ge-A,fe=ge-f;return A===void 0||ye>=e||ye<0||v&&fe>=s}function N(){var ge=B2();if(Q(ge))return q(ge);o=setTimeout(N,U(ge))}function q(ge){return o=void 0,x&&n?C(ge):(n=i=void 0,a)}function Y(){o!==void 0&&clearTimeout(o),f=0,n=A=i=o=void 0}function te(){return o===void 0?a:q(B2())}function pe(){var ge=B2(),ye=Q(ge);if(n=arguments,i=this,A=ge,ye){if(o===void 0)return M(A);if(v)return o=setTimeout(N,e),C(A)}return o===void 0&&(o=setTimeout(N,e)),a}return pe.cancel=Y,pe.flush=te,pe}function C2(r){var e=typeof r;return!!r&&(e=="object"||e=="function")}function bre(r){return!!r&&typeof r=="object"}function wre(r){return typeof r=="symbol"||bre(r)&&mre.call(r)==are}function i4(r){if(typeof r=="number")return r;if(wre(r))return n4;if(C2(r)){var e=typeof r.valueOf=="function"?r.valueOf():r;r=C2(e)?e+"":e}if(typeof r!="string")return r===0?r:+r;r=r.replace(cre,"");var t=ure.test(r);return t||Are.test(r)?hre(r.slice(2),t?2:8):lre.test(r)?n4:+r}var xre=vre,E2={exports:{}},Cf=typeof Reflect=="object"?Reflect:null,s4=Cf&&typeof Cf.apply=="function"?Cf.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)},by;Cf&&typeof Cf.ownKeys=="function"?by=Cf.ownKeys:Object.getOwnPropertySymbols?by=function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:by=function(e){return Object.getOwnPropertyNames(e)};function Bre(r){console&&console.warn&&console.warn(r)}var o4=Number.isNaN||function(e){return e!==e};function ni(){ni.init.call(this)}E2.exports=ni,E2.exports.once=Tre,ni.EventEmitter=ni,ni.prototype._events=void 0,ni.prototype._eventsCount=0,ni.prototype._maxListeners=void 0;var a4=10;function wy(r){if(typeof r!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof r)}Object.defineProperty(ni,"defaultMaxListeners",{enumerable:!0,get:function(){return a4},set:function(r){if(typeof r!="number"||r<0||o4(r))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+r+".");a4=r}}),ni.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},ni.prototype.setMaxListeners=function(e){if(typeof e!="number"||e<0||o4(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this};function c4(r){return r._maxListeners===void 0?ni.defaultMaxListeners:r._maxListeners}ni.prototype.getMaxListeners=function(){return c4(this)},ni.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var i=e==="error",s=this._events;if(s!==void 0)i=i&&s.error===void 0;else if(!i)return!1;if(i){var a;if(t.length>0&&(a=t[0]),a instanceof Error)throw a;var o=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw o.context=a,o}var A=s[e];if(A===void 0)return!1;if(typeof A=="function")s4(A,this,t);else for(var f=A.length,m=d4(A,f),n=0;n<f;++n)s4(m[n],this,t);return!0};function l4(r,e,t,n){var i,s,a;if(wy(t),s=r._events,s===void 0?(s=r._events=Object.create(null),r._eventsCount=0):(s.newListener!==void 0&&(r.emit("newListener",e,t.listener?t.listener:t),s=r._events),a=s[e]),a===void 0)a=s[e]=t,++r._eventsCount;else if(typeof a=="function"?a=s[e]=n?[t,a]:[a,t]:n?a.unshift(t):a.push(t),i=c4(r),i>0&&a.length>i&&!a.warned){a.warned=!0;var o=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");o.name="MaxListenersExceededWarning",o.emitter=r,o.type=e,o.count=a.length,Bre(o)}return r}ni.prototype.addListener=function(e,t){return l4(this,e,t,!1)},ni.prototype.on=ni.prototype.addListener,ni.prototype.prependListener=function(e,t){return l4(this,e,t,!0)};function Cre(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function u4(r,e,t){var n={fired:!1,wrapFn:void 0,target:r,type:e,listener:t},i=Cre.bind(n);return i.listener=t,n.wrapFn=i,i}ni.prototype.once=function(e,t){return wy(t),this.on(e,u4(this,e,t)),this},ni.prototype.prependOnceListener=function(e,t){return wy(t),this.prependListener(e,u4(this,e,t)),this},ni.prototype.removeListener=function(e,t){var n,i,s,a,o;if(wy(t),i=this._events,i===void 0)return this;if(n=i[e],n===void 0)return this;if(n===t||n.listener===t)--this._eventsCount===0?this._events=Object.create(null):(delete i[e],i.removeListener&&this.emit("removeListener",e,n.listener||t));else if(typeof n!="function"){for(s=-1,a=n.length-1;a>=0;a--)if(n[a]===t||n[a].listener===t){o=n[a].listener,s=a;break}if(s<0)return this;s===0?n.shift():Ere(n,s),n.length===1&&(i[e]=n[0]),i.removeListener!==void 0&&this.emit("removeListener",e,o||t)}return this},ni.prototype.off=ni.prototype.removeListener,ni.prototype.removeAllListeners=function(e){var t,n,i;if(n=this._events,n===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[e]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[e]),this;if(arguments.length===0){var s=Object.keys(n),a;for(i=0;i<s.length;++i)a=s[i],a!=="removeListener"&&this.removeAllListeners(a);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(t=n[e],typeof t=="function")this.removeListener(e,t);else if(t!==void 0)for(i=t.length-1;i>=0;i--)this.removeListener(e,t[i]);return this};function A4(r,e,t){var n=r._events;if(n===void 0)return[];var i=n[e];return i===void 0?[]:typeof i=="function"?t?[i.listener||i]:[i]:t?Sre(i):d4(i,i.length)}ni.prototype.listeners=function(e){return A4(this,e,!0)},ni.prototype.rawListeners=function(e){return A4(this,e,!1)},ni.listenerCount=function(r,e){return typeof r.listenerCount=="function"?r.listenerCount(e):h4.call(r,e)},ni.prototype.listenerCount=h4;function h4(r){var e=this._events;if(e!==void 0){var t=e[r];if(typeof t=="function")return 1;if(t!==void 0)return t.length}return 0}ni.prototype.eventNames=function(){return this._eventsCount>0?by(this._events):[]};function d4(r,e){for(var t=new Array(e),n=0;n<e;++n)t[n]=r[n];return t}function Ere(r,e){for(;e+1<r.length;e++)r[e]=r[e+1];r.pop()}function Sre(r){for(var e=new Array(r.length),t=0;t<e.length;++t)e[t]=r[t].listener||r[t];return e}function Tre(r,e){return new Promise(function(t,n){function i(a){r.removeListener(e,s),n(a)}function s(){typeof r.removeListener=="function"&&r.removeListener("error",i),t([].slice.call(arguments))}f4(r,e,s,{once:!0}),e!=="error"&&Ire(r,i,{once:!0})})}function Ire(r,e,t){typeof r.on=="function"&&f4(r,"error",e,t)}function f4(r,e,t,n){if(typeof r.on=="function")n.once?r.once(e,t):r.on(e,t);else if(typeof r.addEventListener=="function")r.addEventListener(e,function i(s){n.once&&r.removeEventListener(e,i),t(s)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof r)}var p4=E2.exports,Lre={fr:{name:"France",bbox:[[-4.59235,41.380007],[9.560016,51.148506]]},us:{name:"United States",bbox:[[-171.791111,18.91619],[-66.96466,71.357764]]},ru:{name:"Russia",bbox:[[19.66064,41.151416],[190.10042,81.2504]]},ca:{name:"Canada",bbox:[[-140.99778,41.675105],[-52.648099,83.23324]]}},Fre={de:"Suche",it:"Ricerca",en:"Search",nl:"Zoeken",fr:"Chercher",ca:"Cerca",he:"לחפש",ja:"サーチ",lv:"Meklēt",pt:"Procurar",sr:"Претрага",zh:"搜索",cs:"Vyhledávání",hu:"Keresés",ka:"ძიება",nb:"Søke",sk:"Vyhľadávanie",th:"ค้นหา",fi:"Hae",is:"Leita",ko:"수색",pl:"Szukaj",sl:"Iskanje",fa:"جستجو",ru:"Поиск"},Mre={placeholder:Fre},g4={exports:{}};(function(r){(function(e,t,n){r.exports?r.exports=n():e[t]=n()})(Fd,"subtag",function(){var e="",t=/^([a-zA-Z]{2,3})(?:[_-]+([a-zA-Z]{3})(?=$|[_-]+))?(?:[_-]+([a-zA-Z]{4})(?=$|[_-]+))?(?:[_-]+([a-zA-Z]{2}|[0-9]{3})(?=$|[_-]+))?/;function n(A){return A.match(t)||[]}function i(A){return n(A).filter(function(f,m){return f&&m})}function s(A){return A=n(A),{language:A[1]||e,extlang:A[2]||e,script:A[3]||e,region:A[4]||e}}function a(A,f,m){Object.defineProperty(A,f,{value:m,enumerable:!0})}function o(A,f,m){function v(x){return n(x)[A]||e}a(v,"pattern",f),a(s,m,v)}return o(1,/^[a-zA-Z]{2,3}$/,"language"),o(2,/^[a-zA-Z]{3}$/,"extlang"),o(3,/^[a-zA-Z]{4}$/,"script"),o(4,/^[a-zA-Z]{2}$|^[0-9]{3}$/,"region"),a(s,"split",i),s})})(g4);var Pre=g4.exports,Ure=sre,Rre=xre,Da=e4,Ore=p4.EventEmitter,m4=Lre,Dre=Mre,kre=Pre;function y4(r,e){this._eventEmitter=new Ore,this.options=Da({},this.options,e),this.inputString="",this.fresh=!0,this.lastSelected=null,this.geocoderApi=r}y4.prototype={options:{zoom:16,flyTo:!0,trackProximity:!0,showResultsWhileTyping:!1,minLength:2,reverseGeocode:!1,limit:5,enableEventLogging:!0,marker:!0,popup:!1,maplibregl:null,collapsed:!1,clearAndBlurOnEsc:!1,clearOnBlur:!1,getItemValue:function(r){return r.text!==void 0?r.text:r.place_name},render:function(r){if(r.geometry){var o=r.place_name.split(",");return'<div class="mapboxgl-ctrl-geocoder--result maplibregl-ctrl-geocoder--result"><svg class="mapboxgl-ctrl-geocoder--result-icon maplibre-ctrl-geocoder--result-icon" viewBox="0 0 24 32" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12 0C5.36571 0 0 5.38676 0 12.0471C0 21.0824 12 32 12 32C12 32 24 21.0824 24 12.0471C24 5.38676 18.6343 0 12 0ZM12 16.3496C9.63428 16.3496 7.71429 14.4221 7.71429 12.0471C7.71429 9.67207 9.63428 7.74454 12 7.74454C14.3657 7.74454 16.2857 9.67207 16.2857 12.0471C16.2857 14.4221 14.3657 16.3496 12 16.3496Z" fill="#687078"/></svg><div><div class="mapboxgl-ctrl-geocoder--result-title maplibregl-ctrl-geocoder--result-title">'+o[0]+'</div><div class="mapboxgl-ctrl-geocoder--result-address maplibregl-ctrl-geocoder--result-address">'+o.splice(1,o.length).join(",")+"</div></div></div>"}else{var e=r.text,t=e.toLowerCase().indexOf(this.query.toLowerCase()),n=this.query.length,i=e.substring(0,t),s=e.substring(t,t+n),a=e.substring(t+n);return'<div class="mapboxgl-ctrl-geocoder--suggestion maplibregl-ctrl-geocoder--suggestion"><svg class="mapboxgl-ctrl-geocoder--suggestion-icon maplibre-ctrl-geocoder--suggestion-icon" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg"><path d="M22.8702 20.1258H21.4248L20.9125 19.6318C22.7055 17.546 23.785 14.8382 23.785 11.8925C23.785 5.32419 18.4608 0 11.8925 0C5.32419 0 0 5.32419 0 11.8925C0 18.4608 5.32419 23.785 11.8925 23.785C14.8382 23.785 17.546 22.7055 19.6318 20.9125L20.1258 21.4248V22.8702L29.2739 32L32 29.2739L22.8702 20.1258ZM11.8925 20.1258C7.33676 20.1258 3.65923 16.4483 3.65923 11.8925C3.65923 7.33676 7.33676 3.65923 11.8925 3.65923C16.4483 3.65923 20.1258 7.33676 20.1258 11.8925C20.1258 16.4483 16.4483 20.1258 11.8925 20.1258Z" fill="#687078"/></svg><div class="mapboxgl-ctrl-geocoder--suggestion-info maplibregl-ctrl-geocoder--suggestion-info"><div class="mapboxgl-ctrl-geocoder--suggestion-title maplibregl-ctrl-geocoder--suggestion-title">'+i+'<span class="mapboxgl-ctrl-geocoder--suggestion-match maplibregl-ctrl-geocoder--suggestion-match">'+s+"</span>"+a+"</div></div></div>"}},popupRender:function(r){var e=r.place_name.split(",");return'<div class="mapboxgl-ctrl-geocoder--suggestion maplibre-ctrl-geocoder--suggestion popup-suggestion"><div class="mapboxgl-ctrl-geocoder--suggestion-title maplibre-ctrl-geocoder--suggestion-title popup-suggestion-title">'+e[0]+'</div><div class="mapboxgl-ctrl-geocoder--suggestion-address maplibre-ctrl-geocoder--suggestion-address popup-suggestion-address">'+e.splice(1,e.length).join(",")+"</div></div>"},showResultMarkers:!0,debounceSearch:200},addTo:function(r){function e(n,i){if(!document.body.contains(i))throw new Error("Element provided to #addTo() exists, but is not in the DOM");var s=n.onAdd();i.appendChild(s)}if(r._controlContainer)r.addControl(this);else if(r instanceof HTMLElement)e(this,r);else if(typeof r=="string"){var t=document.querySelectorAll(r);if(t.length===0)throw new Error("Element ",r,"not found.");if(t.length>1)throw new Error("Geocoder can only be added to a single html element");e(this,t[0])}else throw new Error("Error: addTo must be a maplibre-gl-js map, an html element, or a CSS selector query for a single html element")},onAdd:function(r){if(r&&typeof r!="string"&&(this._map=r),this.setLanguage(),this.options.localGeocoderOnly&&!this.options.localGeocoder)throw new Error("A localGeocoder function must be specified to use localGeocoderOnly mode");this._onChange=this._onChange.bind(this),this._onKeyDown=this._onKeyDown.bind(this),this._onPaste=this._onPaste.bind(this),this._onBlur=this._onBlur.bind(this),this._showButton=this._showButton.bind(this),this._hideButton=this._hideButton.bind(this),this._onQueryResult=this._onQueryResult.bind(this),this.clear=this.clear.bind(this),this._updateProximity=this._updateProximity.bind(this),this._collapse=this._collapse.bind(this),this._unCollapse=this._unCollapse.bind(this),this._clear=this._clear.bind(this),this._clearOnBlur=this._clearOnBlur.bind(this);var e=this.container=document.createElement("div");e.className="mapboxgl-ctrl-geocoder mapboxgl-ctrl maplibregl-ctrl-geocoder maplibregl-ctrl";var t=this.createIcon("search",'<path d="M7.4 2.5c-2.7 0-4.9 2.2-4.9 4.9s2.2 4.9 4.9 4.9c1 0 1.8-.2 2.5-.8l3.7 3.7c.2.2.4.3.8.3.7 0 1.1-.4 1.1-1.1 0-.3-.1-.5-.3-.8L11.4 10c.4-.8.8-1.6.8-2.5.1-2.8-2.1-5-4.8-5zm0 1.6c1.8 0 3.2 1.4 3.2 3.2s-1.4 3.2-3.2 3.2-3.3-1.3-3.3-3.1 1.4-3.3 3.3-3.3z"/>');this._inputEl=document.createElement("input"),this._inputEl.type="text",this._inputEl.className="mapboxgl-ctrl-geocoder--input maplibregl-ctrl-geocoder--input",this.setPlaceholder(),this.options.collapsed&&(this._collapse(),this.container.addEventListener("mouseenter",this._unCollapse),this.container.addEventListener("mouseleave",this._collapse),this._inputEl.addEventListener("focus",this._unCollapse)),(this.options.collapsed||this.options.clearOnBlur)&&this._inputEl.addEventListener("blur",this._onBlur),this._inputEl.addEventListener("keydown",Rre(this._onKeyDown,this.options.debounceSearch)),this._inputEl.addEventListener("paste",this._onPaste),this._inputEl.addEventListener("change",this._onChange),this.container.addEventListener("mouseenter",this._showButton),this.container.addEventListener("mouseleave",this._hideButton);var n=document.createElement("div");n.classList.add("mapboxgl-ctrl-geocoder--pin-right","maplibregl-ctrl-geocoder--pin-right"),this._clearEl=document.createElement("button"),this._clearEl.setAttribute("aria-label","Clear"),this._clearEl.addEventListener("click",this.clear),this._clearEl.className="mapboxgl-ctrl-geocoder--button maplibregl-ctrl-geocoder--button";var i=this.createIcon("close",'<path d="M3.8 2.5c-.6 0-1.3.7-1.3 1.3 0 .3.2.7.5.8L7.2 9 3 13.2c-.3.3-.5.7-.5 1 0 .6.7 1.3 1.3 1.3.3 0 .7-.2 1-.5L9 10.8l4.2 4.2c.2.3.7.3 1 .3.6 0 1.3-.7 1.3-1.3 0-.3-.2-.7-.3-1l-4.4-4L15 4.6c.3-.2.5-.5.5-.8 0-.7-.7-1.3-1.3-1.3-.3 0-.7.2-1 .3L9 7.1 4.8 2.8c-.3-.1-.7-.3-1-.3z"/>');return this._clearEl.appendChild(i),this._loadingEl=this.createIcon("loading",'<path fill="#333" d="M4.4 4.4l.8.8c2.1-2.1 5.5-2.1 7.6 0l.8-.8c-2.5-2.5-6.7-2.5-9.2 0z"/><path opacity=".1" d="M12.8 12.9c-2.1 2.1-5.5 2.1-7.6 0-2.1-2.1-2.1-5.5 0-7.7l-.8-.8c-2.5 2.5-2.5 6.7 0 9.2s6.6 2.5 9.2 0 2.5-6.6 0-9.2l-.8.8c2.2 2.1 2.2 5.6 0 7.7z"/>'),n.appendChild(this._clearEl),n.appendChild(this._loadingEl),e.appendChild(t),e.appendChild(this._inputEl),e.appendChild(n),this._typeahead=new Ure(this._inputEl,[],{filter:!1,minLength:this.options.minLength,limit:this.options.limit,noInitialSelection:!0}),this.setRenderFunction(this.options.render),this._typeahead.getItemValue=this.options.getItemValue,this.mapMarker=null,this.resultMarkers=[],this._handleMarker=this._handleMarker.bind(this),this._handleResultMarkers=this._handleResultMarkers.bind(this),this._map&&(this.options.trackProximity&&(this._updateProximity(),this._map.on("moveend",this._updateProximity)),this._maplibregl=this.options.maplibregl,!this._maplibregl&&this.options.marker&&(console.error("No maplibregl detected in options. Map markers are disabled. Please set options.maplibregl."),this.options.marker=!1)),e},createIcon:function(r,e){var t=document.createElementNS("http://www.w3.org/2000/svg","svg");if(t.setAttribute("class","mapboxgl-ctrl-geocoder--icon mapboxgl-ctrl-geocoder--icon-"+r+" maplibregl-ctrl-geocoder--icon maplibregl-ctrl-geocoder--icon-"+r),t.setAttribute("viewBox","0 0 18 18"),t.setAttribute("xml:space","preserve"),t.setAttribute("width",18),t.setAttribute("height",18),"innerHTML"in t)t.innerHTML=e;else{var n=document.createElement("div");n.innerHTML="<svg>"+e.valueOf().toString()+"</svg>";var i=n.firstChild,s=i.firstChild;t.appendChild(s)}return t},onRemove:function(){return this.container.parentNode.removeChild(this.container),this.options.trackProximity&&this._map&&this._map.off("moveend",this._updateProximity),this._removeMarker(),this._map=null,this},_onPaste:function(r){var e=(r.clipboardData||window.clipboardData).getData("text");e.length>=this.options.minLength&&this.options.showResultsWhileTyping&&this._geocode(e)},_onKeyDown:function(r){var e=27,t=9;if(r.keyCode===e&&this.options.clearAndBlurOnEsc)return this._clear(r),this._inputEl.blur();var n=r.target&&r.target.shadowRoot?r.target.shadowRoot.activeElement:r.target,i=n?n.value:"";if(!i)return this.fresh=!0,r.keyCode!==t&&this.clear(r),this._clearEl.style.display="none";if(!(r.metaKey||[t,e,37,39,38,40].indexOf(r.keyCode)!==-1)){if(r.keyCode===13)if(!this.options.showResultsWhileTyping)this._typeahead.selected||this._geocode(n.value);else{this._typeahead.selected==null&&this.geocoderApi.getSuggestions?this._geocode(n.value,!0):this._typeahead.selected==null&&this.options.showResultMarkers&&this._fitBoundsForMarkers();return}n.value.length>=this.options.minLength&&this.options.showResultsWhileTyping&&this._geocode(n.value)}},_showButton:function(){this._inputEl.value.length>0&&(this._clearEl.style.display="block")},_hideButton:function(){this._typeahead.selected&&(this._clearEl.style.display="none")},_onBlur:function(r){this.options.clearOnBlur&&this._clearOnBlur(r),this.options.collapsed&&this._collapse()},_onChange:function(){var r=this._typeahead.selected;if(r&&!r.geometry)r.placeId?this._geocode(r.placeId,!0,!0):this._geocode(r.text,!0);else if(r&&JSON.stringify(r)!==this.lastSelected){if(this._clearEl.style.display="none",this.options.flyTo){var e;if(this._removeResultMarkers(),r.properties&&m4[r.properties.short_code])e=Da({},this.options.flyTo),this._map&&this._map.fitBounds(m4[r.properties.short_code].bbox,e);else if(r.bbox){var t=r.bbox;e=Da({},this.options.flyTo),this._map&&this._map.fitBounds([[t[0],t[1]],[t[2],t[3]]],e)}else{var n={zoom:this.options.zoom};e=Da({},n,this.options.flyTo),r.center?e.center=r.center:r.geometry&&r.geometry.type&&r.geometry.type==="Point"&&r.geometry.coordinates&&(e.center=r.geometry.coordinates),this._map&&this._map.flyTo(e)}}this.options.marker&&this._maplibregl&&this._handleMarker(r),this._inputEl.focus(),this._inputEl.scrollLeft=0,this._inputEl.setSelectionRange(0,0),this.lastSelected=JSON.stringify(r),this._typeahead.selected=null,this._eventEmitter.emit("result",{result:r})}},_getConfigForRequest:function(){var r=["bbox","limit","proximity","countries","types","language","reverseMode"],e=this,t=r.reduce(function(n,i){return e.options[i]&&(["countries","types","language"].indexOf(i)>-1?n[i]=e.options[i].split(/[\s,]+/):n[i]=e.options[i],i==="proximity"&&e.options[i]&&typeof e.options[i].longitude=="number"&&typeof e.options[i].latitude=="number"&&(n[i]=[e.options[i].longitude,e.options[i].latitude])),n},{});return t},_geocode:function(r,e,t){this._loadingEl.style.display="block",this._eventEmitter.emit("loading",{query:r}),this.inputString=r;var n=null,i=this._getConfigForRequest(),s;if(this.options.localGeocoderOnly)s=Promise.resolve();else if(this.options.reverseGeocode&&/(-?\d+\.?\d*)[, ]+(-?\d+\.?\d*)[ ]*$/.test(r)){var a=r.split(/[\s(,)?]+/).map(function(f){return parseFloat(f,10)}).reverse();i.types&&i.types[0],i=Da(i,{query:a,limit:1}),"proximity"in i&&delete i.proximity,s=this.geocoderApi.reverseGeocode(i)}else i=Da(i,{query:r}),this.geocoderApi.getSuggestions?e?this.geocoderApi.searchByPlaceId&&t?s=this.geocoderApi.searchByPlaceId(i):s=this.geocoderApi.forwardGeocode(i):s=this.geocoderApi.getSuggestions(i):s=this.geocoderApi.forwardGeocode(i);var o=[];this.options.localGeocoder&&(o=this.options.localGeocoder(r),o||(o=[]));var A=[];return s.catch((function(f){n=f}).bind(this)).then((function(f){this._loadingEl.style.display="none";var m={};return f?m=f:m={type:"FeatureCollection",features:[]},m.config=i,this.fresh&&(this.fresh=!1),m.features=m.features?o.concat(m.features):o,this.options.externalGeocoder?(A=this.options.externalGeocoder(r,m.features,i)||[],A.then(function(v){return m.features=m.features?v.concat(m.features):v,m},function(){return m})):m}).bind(this)).then((function(f){if(n)throw n;this.options.filter&&f.features.length&&(f.features=f.features.filter(this.options.filter));var m=[];f.suggestions?m=f.suggestions:f.place?m=[f.place]:m=f.features,m.length?(this._clearEl.style.display="block",this._typeahead.update(m),(!this.options.showResultsWhileTyping||e)&&this.options.showResultMarkers&&(f.features.length>0||f.place)&&this._fitBoundsForMarkers(),this._eventEmitter.emit("results",f)):(this._clearEl.style.display="none",this._typeahead.selected=null,this._renderNoResults(),this._eventEmitter.emit("results",f))}).bind(this)).catch((function(f){this._loadingEl.style.display="none",o.length&&this.options.localGeocoder||A.length&&this.options.externalGeocoder?(this._clearEl.style.display="block",this._typeahead.update(o)):(this._clearEl.style.display="none",this._typeahead.selected=null,this._renderError()),this._eventEmitter.emit("results",{features:o}),this._eventEmitter.emit("error",{error:f})}).bind(this)),s},_clear:function(r){r&&r.preventDefault(),this._inputEl.value="",this._typeahead.selected=null,this._typeahead.clear(),this._onChange(),this._clearEl.style.display="none",this._removeMarker(),this._removeResultMarkers(),this.lastSelected=null,this._eventEmitter.emit("clear"),this.fresh=!0},clear:function(r){this._clear(r),this._inputEl.focus()},_clearOnBlur:function(r){var e=this;r.relatedTarget&&e._clear(r)},_onQueryResult:function(r){var e=r;if(e.features.length){var t=e.features[0];this._typeahead.selected=t,this._inputEl.value=t.place_name,this._onChange()}},_updateProximity:function(){if(this._map)if(this._map.getZoom()>9){var r=this._map.getCenter().wrap();this.setProximity({longitude:r.lng,latitude:r.lat})}else this.setProximity(null)},_collapse:function(){!this._inputEl.value&&this._inputEl!==document.activeElement&&this.container.classList.add("mapboxgl-ctrl-geocoder--collapsed","maplibregl-ctrl-geocoder--collapsed")},_unCollapse:function(){this.container.classList.remove("mapboxgl-ctrl-geocoder--collapsed","maplibregl-ctrl-geocoder--collapsed")},query:function(r){return this._geocode(r).then(this._onQueryResult),this},_renderError:function(){var r="<div class='mapbox-gl-geocoder--error maplibre-gl-geocoder--error'>There was an error reaching the server</div>";this._renderMessage(r)},_renderNoResults:function(){var r="<div class='mapbox-gl-geocoder--error mapbox-gl-geocoder--no-results maplibre-gl-geocoder--error maplibre-gl-geocoder--no-results'>No results found</div>";this._renderMessage(r)},_renderMessage:function(r){this._typeahead.update([]),this._typeahead.selected=null,this._typeahead.clear(),this._typeahead.renderError(r)},_getPlaceholderText:function(){if(this.options.placeholder)return this.options.placeholder;if(this.options.language){var r=this.options.language.split(",")[0],e=kre.language(r),t=Dre.placeholder[e];if(t)return t}return"Search"},_fitBoundsForMarkers:function(){if(!(this._typeahead.data.length<1)){var r=this._typeahead.data.filter(function(i){return typeof i!="string"}).slice(0,this.options.limit);if(this._clearEl.style.display="none",this.options.flyTo&&this._maplibregl&&this._map){var e={padding:100},t=Da({},e,this.options.flyTo),n=new this._maplibregl.LngLatBounds;r.forEach(function(i){n.extend(i.geometry.coordinates)}),this._map.fitBounds(n.toArray(),t)}return r.length>0&&this._maplibregl&&this._handleResultMarkers(r),this}},setInput:function(r){return this._inputEl.value=r,this._typeahead.selected=null,this._typeahead.clear(),r.length>=this.options.minLength&&this.options.showResultsWhileTyping&&this._geocode(r),this},setProximity:function(r){return this.options.proximity=r,this},getProximity:function(){return this.options.proximity},setRenderFunction:function(r){return r&&typeof r=="function"&&(this._typeahead.render=r),this},getRenderFunction:function(){return this._typeahead.render},setLanguage:function(r){var e=navigator.language||navigator.userLanguage||navigator.browserLanguage;return this.options.language=r||this.options.language||e,this},getLanguage:function(){return this.options.language},getZoom:function(){return this.options.zoom},setZoom:function(r){return this.options.zoom=r,this},getFlyTo:function(){return this.options.flyTo},setFlyTo:function(r){return this.options.flyTo=r,this},getPlaceholder:function(){return this.options.placeholder},setPlaceholder:function(r){return this.placeholder=r||this._getPlaceholderText(),this._inputEl.placeholder=this.placeholder,this._inputEl.setAttribute("aria-label",this.placeholder),this},getBbox:function(){return this.options.bbox},setBbox:function(r){return this.options.bbox=r,this},getCountries:function(){return this.options.countries},setCountries:function(r){return this.options.countries=r,this},getTypes:function(){return this.options.types},setTypes:function(r){return this.options.types=r,this},getMinLength:function(){return this.options.minLength},setMinLength:function(r){return this.options.minLength=r,this._typeahead&&(this._typeahead.options.minLength=r),this},getLimit:function(){return this.options.limit},setLimit:function(r){return this.options.limit=r,this._typeahead&&(this._typeahead.options.limit=r),this},getFilter:function(){return this.options.filter},setFilter:function(r){return this.options.filter=r,this},setGeocoderApi:function(r){return this.geocoderApi=r,this},getGeocoderApi:function(){return this.geocoderApi},_handleMarker:function(r){if(this._map){this._removeMarker();var e={color:"#4668F2"},t=Da({},e,this.options.marker);this.mapMarker=new this._maplibregl.Marker(t);var n;if(this.options.popup){var i={},s=Da({},i,this.options.popup);n=new this._maplibregl.Popup(s).setHTML(this.options.popupRender(r))}return r.center?(this.mapMarker.setLngLat(r.center).addTo(this._map),this.options.popup&&this.mapMarker.setPopup(n)):r.geometry&&r.geometry.type&&r.geometry.type==="Point"&&r.geometry.coordinates&&(this.mapMarker.setLngLat(r.geometry.coordinates).addTo(this._map),this.options.popup&&this.mapMarker.setPopup(n)),this}},_removeMarker:function(){this.mapMarker&&(this.mapMarker.remove(),this.mapMarker=null)},_handleResultMarkers:function(r){if(this._map){this._removeResultMarkers();var e={color:"#4668F2"},t=Da({},e,this.options.showResultMarkers);return r.forEach((function(n){if(this.options.showResultMarkers&&this.options.showResultMarkers.element){var i=this.options.showResultMarkers.element.cloneNode(!0);t=Da(t,{element:i})}var s=new this._maplibregl.Marker(Da({},t,{element:i})),a;if(this.options.popup){var o={},A=Da({},o,this.options.popup);a=new this._maplibregl.Popup(A).setHTML(this.options.popupRender(n))}n.center?(s.setLngLat(n.center).addTo(this._map),this.options.popup&&s.setPopup(a)):n.geometry&&n.geometry.type&&n.geometry.type==="Point"&&n.geometry.coordinates&&(s.setLngLat(n.geometry.coordinates).addTo(this._map),this.options.popup&&s.setPopup(a)),this.resultMarkers.push(s)}).bind(this)),this}},_removeResultMarkers:function(){this.resultMarkers&&this.resultMarkers.length>0&&(this.resultMarkers.forEach(function(r){r.remove()}),this.resultMarkers=[])},on:function(r,e){return this._eventEmitter.on(r,e),this},off:function(r,e){return this._eventEmitter.removeListener(r,e),this}};var Nre=y4;const Qre=Bp(Nre);class Hre{constructor(e){this.options=e}onAdd(e){let t=this.options.defaultOptions;return this._map=e,this._img1=document.createElement("img"),this._img1.className="maplibregl-ctrl",this._img1.src=this.options.color?t.logoIcgcOptions.logoUrlColor:t.logoIcgcOptions.logoUrlWhite,this._img1.width=t.logoIcgcOptions.logoWidth,this._img1.title=t.logoIcgcOptions.logoTitle,this.link1=document.createElement("a"),this.link1.href=t.logoIcgcOptions.logoLink,this.link1.target="_blank",this.link1.appendChild(this._img1),this._container1=document.createElement("div"),this._container1.className="maplibregl-ctrl",this._container1.style.width=`${t.logoIcgcOptions.logoWidth}px`,this._container1.appendChild(this.link1),this._img2=document.createElement("img"),this._img2.className="maplibregl-ctrl",this._img2.src=this.options.color?t.logoGencatOptions.logoUrlColor:t.logoGencatOptions.logoUrlWhite,this._img2.width=t.logoGencatOptions.logoWidth,this._img2.title=t.logoGencatOptions.logoTitle,this.link2=document.createElement("a"),this.link2.href=t.logoGencatOptions.logoLink,this.link2.target="_blank",this.link2.appendChild(this._img2),this._container2=document.createElement("div"),this._container2.className="maplibregl-ctrl",this._container2.style.width=`${t.logoGencatOptions.logoWidth}px`,this._container2.appendChild(this.link2),this._mainContainer=document.createElement("div"),this._mainContainer.className="divLogos",this._mainContainer.style="display: flex",this._mainContainer.appendChild(this._container1),this._mainContainer.appendChild(this._container2),this._mainContainer}}var Ef=_4.prototype,S2="WGS 84";function _4(r){r!==void 0&&(S2=r),this.setEllipsoid(S2)}Ef.convertLatLngToUtm=function(r,e,t){var n;if(this.status)return"No ecclipsoid data associated with unknown datum: "+S2;if(!Number.isInteger(t))return"Precision is not integer number.";r=parseFloat(r),e=parseFloat(e);var i=e,s=this.toRadians(r),a=this.toRadians(i);i>=8&&i<=13&&r>54.5&&r<58||r>=56&&r<64&&i>=3&&i<12?n=32:(n=(i+180)/6+1,r>=72&&r<84&&(i>=0&&i<9?n=31:i>=9&&i<21?n=33:i>=21&&i<33?n=35:i>=33&&i<42&&(n=37))),n=parseInt(n);var o=(n-1)*6-180+3,A=this.toRadians(o),f=this.getUtmLetterDesignator(r),m=this.eccSquared/(1-this.eccSquared),v=this.a/Math.sqrt(1-this.eccSquared*Math.sin(s)*Math.sin(s)),x=Math.tan(s)*Math.tan(s),C=m*Math.cos(s)*Math.cos(s),M=Math.cos(s)*(a-A),U=this.a*((1-this.eccSquared/4-3*this.eccSquared*this.eccSquared/64-5*this.eccSquared*this.eccSquared*this.eccSquared/256)*s-(3*this.eccSquared/8+3*this.eccSquared*this.eccSquared/32+45*this.eccSquared*this.eccSquared*this.eccSquared/1024)*Math.sin(2*s)+(15*this.eccSquared*this.eccSquared/256+45*this.eccSquared*this.eccSquared*this.eccSquared/1024)*Math.sin(4*s)-35*this.eccSquared*this.eccSquared*this.eccSquared/3072*Math.sin(6*s)),Q=parseFloat(.9996*v*(M+(1-x+C)*M*M*M/6+(5-18*x+x*x+72*C-58*m)*M*M*M*M*M/120)+5e5),N=parseFloat(.9996*(U+v*Math.tan(s)*(M*M/2+(5-x+9*C+4*C*C)*M*M*M*M/24+(61-58*x+x*x+600*C-330*m)*M*M*M*M*M*M/720)));return r<0&&(N+=1e7),N=v4(N,t),Q=v4(Q,t),{Easting:Q,Northing:N,ZoneNumber:parseInt(n),ZoneLetter:f}},Ef.convertUtmToLatLng=function(r,e,t,n){var i=(1-Math.sqrt(1-this.eccSquared))/(1+Math.sqrt(1-this.eccSquared)),s=r-5e5,a=e,o=t,A=n;if(r===void 0)return"Please pass the UTMEasting!";if(e===void 0)return"Please pass the UTMNorthing!";if(t===void 0)return"Please pass the UTMZoneNumber!";if(n===void 0)return"Please pass the UTMZoneLetter!";["N","P","Q","R","S","T","U","V","W","X","Y","Z"].indexOf(A)!==-1||(a-=1e7);var f=(o-1)*6-180+3,m=this.eccSquared/(1-this.eccSquared),v=a/.9996,x=v/(this.a*(1-this.eccSquared/4-3*this.eccSquared*this.eccSquared/64-5*this.eccSquared*this.eccSquared*this.eccSquared/256)),C=x+(3*i/2-27*i*i*i/32)*Math.sin(2*x)+(21*i*i/16-55*i*i*i*i/32)*Math.sin(4*x)+151*i*i*i/96*Math.sin(6*x);this.toDegrees(C);var M=this.a/Math.sqrt(1-this.eccSquared*Math.sin(C)*Math.sin(C)),U=Math.tan(C)*Math.tan(C),Q=m*Math.cos(C)*Math.cos(C),N=this.a*(1-this.eccSquared)/Math.pow(1-this.eccSquared*Math.sin(C)*Math.sin(C),1.5),q=s/(M*.9996),Y=C-M*Math.tan(C)/N*(q*q/2-(5+3*U+10*Q-4*Q*Q-9*m)*q*q*q*q/24+(61+90*U+298*Q+45*U*U-252*m-3*Q*Q)*q*q*q*q*q*q/720);Y=this.toDegrees(Y);var te=(q-(1+2*U+Q)*q*q*q/6+(5-2*Q+28*U-3*Q*Q+8*m+24*U*U)*q*q*q*q*q/120)/Math.cos(C);return te=f+this.toDegrees(te),{lat:Y,lng:te}},Ef.getUtmLetterDesignator=function(r){return r=parseFloat(r),84>=r&&r>=72?"X":72>r&&r>=64?"W":64>r&&r>=56?"V":56>r&&r>=48?"U":48>r&&r>=40?"T":40>r&&r>=32?"S":32>r&&r>=24?"R":24>r&&r>=16?"Q":16>r&&r>=8?"P":8>r&&r>=0?"N":0>r&&r>=-8?"M":-8>r&&r>=-16?"L":-16>r&&r>=-24?"K":-24>r&&r>=-32?"J":-32>r&&r>=-40?"H":-40>r&&r>=-48?"G":-48>r&&r>=-56?"F":-56>r&&r>=-64?"E":-64>r&&r>=-72?"D":-72>r&&r>=-80?"C":"Z"},Ef.setEllipsoid=function(r){switch(r){case"Airy":this.a=6377563,this.eccSquared=.00667054;break;case"Australian National":this.a=6378160,this.eccSquared=.006694542;break;case"Bessel 1841":this.a=6377397,this.eccSquared=.006674372;break;case"Bessel 1841 Nambia":this.a=6377484,this.eccSquared=.006674372;break;case"Clarke 1866":this.a=6378206,this.eccSquared=.006768658;break;case"Clarke 1880":this.a=6378249,this.eccSquared=.006803511;break;case"Everest":this.a=6377276,this.eccSquared=.006637847;break;case"Fischer 1960 Mercury":this.a=6378166,this.eccSquared=.006693422;break;case"Fischer 1968":this.a=6378150,this.eccSquared=.006693422;break;case"GRS 1967":this.a=6378160,this.eccSquared=.006694605;break;case"GRS 1980":this.a=6378137,this.eccSquared=.00669438;break;case"Helmert 1906":this.a=6378200,this.eccSquared=.006693422;break;case"Hough":this.a=6378270,this.eccSquared=.00672267;break;case"International":this.a=6378388,this.eccSquared=.00672267;break;case"Krassovsky":this.a=6378245,this.eccSquared=.006693422;break;case"Modified Airy":this.a=6377340,this.eccSquared=.00667054;break;case"Modified Everest":this.a=6377304,this.eccSquared=.006637847;break;case"Modified Fischer 1960":this.a=6378155,this.eccSquared=.006693422;break;case"South American 1969":this.a=6378160,this.eccSquared=.006694542;break;case"WGS 60":this.a=6378165,this.eccSquared=.006693422;break;case"WGS 66":this.a=6378145,this.eccSquared=.006694542;break;case"WGS 72":this.a=6378135,this.eccSquared=.006694318;break;case"ED50":this.a=6378388,this.eccSquared=.00672267;break;case"WGS 84":case"EUREF89":case"ETRS89":this.a=6378137,this.eccSquared=.00669438;break;default:this.status=!0}},Ef.toDegrees=function(r){return r/Math.PI*180},Ef.toRadians=function(r){return r*Math.PI/180};function v4(r,e){var t=Math.pow(10,e);return Math.round(r*t)/t}var zre=_4;const Gre=Bp(zre);class Vre{constructor(e){this.options=e||{},this.options.utm=this.options.hasOwnProperty("utm")?this.options.utm:!0,this.options.lonlat=this.options.hasOwnProperty("lonlat")?this.options.lonlat:!0}onAdd(e){const t=new Gre;return this._map=e,this._container=document.createElement("div"),this._container.className="maplibregl-ctrl coordControl",this._container.style.width=`${this.options.width||"225px"}`,this._map.on("mousemove",n=>{const i=n.lngLat.lat,s=n.lngLat.lng;let a="",o="";const A=t.convertLatLngToUtm(i,s,2),f=i>0?"N":"S";this.options.utm&&(a=`ETRS89 UTM ${A.ZoneNumber}${f} X:<b> ${A.Easting}</b> Y:<b> ${A.Northing}</b> <br>`),this.options.lonlat&&(o=`WGS 84 Lon:<b> ${s.toFixed(5)}</b> Lat:<b> ${i.toFixed(5)}</b>`);const m=`${a}${o}`;this._container.innerHTML=m}),this._container}_lookUTM31(e,t){var n=0,i=0,s=6,a=84;return e>=n&&e<=s&&t>=i&&t<=a}onRemove(){this._container.parentNode.removeChild(this._container),this._map=void 0}}const T2={defaultOptions:{limitsUrl:"https://tilemaps.icgc.cat/vt/limits-tilejsonV3.json",geocoder:{peliasUrl1:"https://eines.icgc.cat/geocodificador/autocompletar?text=",peliasUrl2:"&layers=topo1%2Ctopo2%2Caddress&size=5"},mapOptions:{container:"map",center:{0:1.537786,1:41.837539},zoom:7.5,bearing:0,pitch:0,hash:!1,style:"https://geoserveis.icgc.cat/contextmaps/icgc_mapa_base_gris.json",maxZoom:18,maxPitch:85},logoIcgcOptions:{logoUrlColor:"https://tilemaps.icgc.cat/cdn/logos/icgc_logo_color.png",logoUrlWhite:"https://tilemaps.icgc.cat/cdn/logos/icgc_logo_blanc.svg",logoLink:"https://www.icgc.cat",logoTitle:"Institut Cartogràfic i Geològic de Catalunya",logoWidth:100},logoGencatOptions:{logoUrlColor:"https://tilemaps.icgc.cat/cdn/logos/gencat_logo_color.png",logoUrlWhite:"https://tilemaps.icgc.cat/cdn/logos/gencat_logo_blanc.png",logoLink:"https://web.gencat.cat/",logoTitle:"Generalitat de Catalunya",logoWidth:100},map3dOptions:{spaceErrorFactor:2,exaggeration:1,zfactor:48,minZoomRange:15.5,maxZoomRange:22,urlTilesetCities:"https://tilemaps.icgc.cat/vector/3dtiles/ciutats/v1/tilesetV1.0.json",layerIdOrder:"place-isolated",sourceLayerFilterId:"place",minZoomFilter:14,layerId3d:"edificisMapboxLayer",terrainSource:"ICGC5M",style3dName:"orto3d",imageIcon:"https://tilemaps.icgc.cat/cdn/images/stick.png"},baseStyles:[{key:"TOPO",url:"https://geoserveis.icgc.cat/contextmaps/icgc_mapa_estandard.json",image:"https://visors.icgc.cat/contextmaps/imatges_estil/icgc_mapa_estandard.png"},{key:"ORTO",url:"https://geoserveis.icgc.cat/contextmaps/icgc_orto_estandard.json",image:"https://visors.icgc.cat/contextmaps/imatges_estil/icgc_orto_hibrida.png"},{key:"ORTO3D",url:"https://tilemaps.icgc.cat/cdn/styles/icgc_orto_3d.json",image:"https://visors.icgc.cat/contextmaps/imatges_estil/icgc_orto_hibrida.png"},{key:"ADMIN",url:"https://geoserveis.icgc.cat/contextmaps/icgc_delimitacio_limits_administratius.json",image:"https://visors.icgc.cat/contextmaps/imatges_estil/icgc_delimitacio_limits_administratius.png"},{key:"DARK",url:"https://geoserveis.icgc.cat/contextmaps/icgc_mapa_base_fosc.json",image:"https://visors.icgc.cat/contextmaps/imatges_estil/icgc_mapa_base_fosc.png"},{key:"LIGHT",url:"https://geoserveis.icgc.cat/contextmaps/icgc_mapa_base_gris.json",image:"https://visors.icgc.cat/contextmaps/imatges_estil/icgc_mapa_base_gris.png"},{key:"GEOLOGY",url:"https://geoserveis.icgc.cat/contextmaps/icgc_geologic_informacio.json",image:"https://visors.icgc.cat/contextmaps/imatges_estil/icgc_geologic_informacio.png"}],urlTerrainICGC:[{name:"ICGC5M",url:"https://tilemaps.icgc.cat/tileserver/tileserver/terreny-5m-30m-rgb-extent/{z}/{x}/{y}.png"},{name:"WORLD30M",url:"https://s3.amazonaws.com/elevation-tiles-prod/terrarium/{z}/{x}/{y}.png",encoding:"terrarium"}],ortoLayersICGC:[{name:"ortofotoColorProvisional",key:"ortofoto_color_provisional",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_provisional"},{name:"ortofotoColor2022",key:"ortofoto_color_2022",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2022"},{name:"ortofotoColor2021",key:"ortofoto_color_2021",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2021"},{name:"ortofotoColor2020",key:"ortofoto_color_2020",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2020"},{name:"ortofotoColor2019",key:"ortofoto_color_2019",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2019"},{name:"ortofotoColor2018",key:"ortofoto_color_2018",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2018"},{name:"ortofotoColor2017",key:"ortofoto_color_2017",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2017"},{name:"ortofotoColor2016",key:"ortofoto_color_2016",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2016"},{name:"ortofotoColor2015",key:"ortofoto_color_2015",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2015"},{name:"ortofotoColor2014",key:"ortofoto_color_2014",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2014"},{name:"ortofotoColor2013",key:"ortofoto_color_2013",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2013"},{name:"ortofotoColor2012",key:"ortofoto_color_2012",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2012"},{name:"ortofotoColor2011",key:"ortofoto_color_2011",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2011"},{name:"ortofotoColor2010",key:"ortofoto_color_2010",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2010"},{name:"ortofotoColor2009",key:"ortofoto_color_2009",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2009"},{name:"ortofotoColor2008",key:"ortofoto_color_2008",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2008"},{name:"ortofotoColor20062007",key:"ortofoto_color_2006-2007",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2006-2007"},{name:"ortofotoColor20042005",key:"ortofoto_color_2004-2005",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2004-2005"},{name:"ortofotoColor20002003",key:"ortofoto_color_2000-2003",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2000-2003"},{name:"ortofotoBlancINegre1998",key:"ortofoto_blanc_i_negre_1998",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_blanc_i_negre_1998"},{name:"ortofotoBlancINegre19941997",key:"ortofoto_blanc_i_negre_1994-1997",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_blanc_i_negre_1994-1997"},{name:"ortofotoColor1993",key:"ortofoto_color_1993",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_1993"},{name:"ortofotoBlancINegre19831992",key:"ortofoto_blanc_i_negre_1983-1992",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_blanc_i_negre_1983-1992"},{name:"ortofotoBlancINegre19701977",key:"ortofoto_blanc_i_negre_1970-1977",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_blanc_i_negre_1970-1977"},{name:"ortofotoBlancINegre1956",key:"ortofoto_blanc_i_negre_1956",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_blanc_i_negre_1956"},{name:"ortofotoBlancINegre1945",key:"ortofoto_blanc_i_negre_1945",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_blanc_i_negre_1945"},{name:"ortofotoColorSerieAnual",key:"ortofoto_color_serie_anual",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_serie_anual"},{name:"ortofotoInfraroigProvisional",key:"ortofoto_infraroig_provisional",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_provisional"},{name:"ortofotoInfraroig2022",key:"ortofoto_infraroig_2022",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2022"},{name:"ortofotoInfraroig2021",key:"ortofoto_infraroig_2021",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2021"},{name:"ortofotoInfraroig2020",key:"ortofoto_infraroig_2020",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2020"},{name:"ortofotoInfraroig2019",key:"ortofoto_infraroig_2019",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2019"},{name:"ortofotoInfraroig2018",key:"ortofoto_infraroig_2018",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2018"},{name:"ortofotoInfraroig2017",key:"ortofoto_infraroig_2017",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2017"},{name:"ortofotoInfraroig2016",key:"ortofoto_infraroig_2016",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2016"},{name:"ortofotoInfraroig2015",key:"ortofoto_infraroig_2015",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2015"},{name:"ortofotoInfraroig2014",key:"ortofoto_infraroig_2014",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2014"},{name:"ortofotoInfraroig2013",key:"ortofoto_infraroig_2013",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2013"},{name:"ortofotoInfraroig2012",key:"ortofoto_infraroig_2012",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2012"},{name:"ortofotoInfraroig2011",key:"ortofoto_infraroig_2011",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2011"},{name:"ortofotoInfraroig2010",key:"ortofoto_infraroig_2010",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2010"},{name:"ortofotoInfraroig2009",key:"ortofoto_infraroig_2009",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2009"},{name:"ortofotoInfraroig2008",key:"ortofoto_infraroig_2008",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2008"},{name:"ortofotoInfraroig20062007",key:"ortofoto_infraroig_2006-2007",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2006-2007"},{name:"ortofotoInfraroig19961997",key:"ortofoto_infraroig_1996-1997",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_1996-1997"},{name:"ortofotoInfraroigSerieAnual",key:"ortofoto_infraroig_serie_anual",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_serie_anual"}],vectorLayersICGC:[{name:"agrupacionsCensals2015",key:"agrupacions_censals_2015"},{name:"agrupacionsCensals2016",key:"agrupacions_censals_2016"},{name:"agrupacionsCensals2017",key:"agrupacions_censals_2017"},{name:"agrupacionsCensals2018",key:"agrupacions_censals_2018"},{name:"agrupacionsCensals2019",key:"agrupacions_censals_2019"},{name:"agrupacionsCensals2020",key:"agrupacions_censals_2020"},{name:"agrupacionsCensals2021",key:"agrupacions_censals_2021"},{name:"agrupacionsCensalsVigent",key:"agrupacions_censals_vigent"},{name:"agrupacionsCensalsVigentText",key:"agrupacions_censals_vigent_text"},{name:"areesBasiquesPolicials2019",key:"arees_basiques_policials_2019"},{name:"areesBasiquesPolicials2020",key:"arees_basiques_policials_2020"},{name:"areesBasiquesPolicials2022",key:"arees_basiques_policials_2022"},{name:"areesBasiquesPolicialsVigent",key:"arees_basiques_policials_vigent"},{name:"areesBasiquesPolicialsVigentText",key:"arees_basiques_policials_vigent_text"},{name:"areesBasiquesSalutVigent",key:"arees_basiques_salut_vigent"},{name:"areesBasiquesServeisSocialsVigent",key:"arees_basiques_serveis_socials_vigent"},{name:"areesBasiquesServeisSocialsVigentText",key:"arees_basiques_serveis_socials_vigent_text"},{name:"areesGestioAssistencialVigent",key:"arees_gestio_assistencial_vigent"},{name:"areesHidrogeologiquesAquifersVigent",key:"arees_hidrogeologiques_aquifers_vigent"},{name:"catalunyaVigent",key:"catalunya_vigent"},{name:"catalunyaVigentText",key:"catalunya_vigent_text"},{name:"comarques2022",key:"comarques_2022"},{name:"comarquesVigent",key:"comarques_vigent"},{name:"comarquesVigentText",key:"comarques_vigent_text"},{name:"districtesCensals2015",key:"districtes_censals_2015"},{name:"districtesCensals2016",key:"districtes_censals_2016"},{name:"districtesCensals2017",key:"districtes_censals_2017"},{name:"districtesCensals2018",key:"districtes_censals_2018"},{name:"districtesCensals2019",key:"districtes_censals_2019"},{name:"districtesCensals2020",key:"districtes_censals_2020"},{name:"districtesCensals2021",key:"districtes_censals_2021"},{name:"districtesCensals2022",key:"districtes_censals_2022"},{name:"districtesCensalsVigent",key:"districtes_censals_vigent"},{name:"districtesCensalsVigentText",key:"districtes_censals_vigent_text"},{name:"incendisForestalsVigent",key:"incendis_forestals_vigent"},{name:"incendisForestalsVigentText",key:"incendis_forestals_vigent_text"},{name:"municipis2022",key:"municipis_2022"},{name:"municipis2022Text",key:"municipis_2022_text"},{name:"municipisVigent",key:"municipis_vigent"},{name:"municipisVigentText",key:"municipis_vigent_text"},{name:"partitsJudicialsVigent",key:"partits_judicials_vigent"},{name:"partitsJudicialsVigentText",key:"partits_judicials_vigent_text"},{name:"plaTerritorial2015",key:"pla_territorial_2015"},{name:"plaTerritorialVigent",key:"pla_territorial_vigent"},{name:"plaTerritorialVigentText",key:"pla_territorial_vigent_text"},{name:"provinciesVigent",key:"provincies_vigent"},{name:"provinciesVigentText",key:"provincies_vigent_text"},{name:"regionsPolicialsVigent",key:"regions_policials_vigent"},{name:"regionsPolicialsVigentText",key:"regions_policials_vigent_text"},{name:"regionsSanitariesVigent",key:"regions_sanitaries_vigent"},{name:"regionsSanitariesVigentText",key:"regions_sanitaries_vigent_text"},{name:"seccionsCensals2015",key:"seccions_censals_2015"},{name:"seccionsCensals2016",key:"seccions_censals_2016"},{name:"seccionsCensals2017",key:"seccions_censals_2017"},{name:"seccionsCensals2018",key:"seccions_censals_2018"},{name:"seccionsCensals2019",key:"seccions_censals_2019"},{name:"seccionsCensals2020",key:"seccions_censals_2020"},{name:"seccionsCensals2021",key:"seccions_censals_2021"},{name:"seccionsCensals2022",key:"seccions_censals_2022"},{name:"seccionsCensalsVigent",key:"seccions_censals_vigent"},{name:"seccionsCensalsVigentText",key:"seccions_censals_vigent_text"},{name:"sectorsSanitarisVigent",key:"sectors_sanitaris_vigent"},{name:"vegueriesVigent",key:"vegueries_vigent"},{name:"vegueriesVigentText",key:"vegueries_vigent_text"}],vectorLayers:[{key:"cobertes2018",url:"https://tilemaps.icgc.cat/tileserver/cobertes_tilejson.json",legend:"https://tilemaps.icgc.cat/cdn/images/llegendaCobertesSol2018.jpg"}],wmsLayers:[{key:"espaisInteresGeologic",layer:"",url:"https://geoserveis.icgc.cat/servei/catalunya/espais-interes-geologic/wms/service?&service=WMS&request=GetMap&layers=espais-interes-geologic&styles=&format=image%2Fpng&transparent=true&version=1.1.1&tipus=wms&width=512&height=512&srs=EPSG%3A3857&bbox={bbox-epsg-3857}"},{key:"gravimetriaBouguer500000",layer:"",url:"https://geoserveis.icgc.cat/servei/catalunya/gravimetria/wms/service?&service=WMS&request=GetMap&layers=anomalia_bouguer_500000&styles=&format=image%2Fpng&transparent=true&version=1.1.1&tipus=wms&width=512&height=512&srs=EPSG%3A3857&bbox={bbox-epsg-3857}"},{key:"cobertesSol2018",layer:"",url:"https://geoserveis.icgc.cat/servei/catalunya/cobertes-sol/wms/service?&service=WMS&request=GetMap&layers=cobertes_2018&styles=&format=image%2Fpng&transparent=true&version=1.1.1&tipus=wms&width=512&height=512&srs=EPSG%3A3857&bbox={bbox-epsg-3857}"},{key:"administratiu",layer:"",url:"http://geoserveis.icgc.cat/servei/catalunya/mapa-base/wmts/administratiu/MON3857NW/{z}/{x}/{y}.png"},{key:"simplificat",layer:"",url:"http://geoserveis.icgc.cat/servei/catalunya/mapa-base/wmts/simplificat/MON3857NW/{z}/{x}/{y}.png"},{key:"cims",layer:"",url:"https://geoserveis.icgc.cat/icc_100cims/wms/service?REQUEST=GetMap&SERVICE=WMS&VERSION=1.1.1&LAYERS=0&STYLES=&FORMAT=image/png&BGCOLOR=0xFFFFFF&TRANSPARENT=TRUE&SRS=EPSG:25831&BBOX=137118.923076923,4488408.75,650959.076923077,4749634.75&WIDTH=895&HEIGHT=455"},{key:"cobertesSol",layer:"",url:"http://geoserveis.icgc.cat/servei/catalunya/cobertes-sol/wms?REQUEST=GetMap&SERVICE=WMS&VERSION=1.3.0&LAYERS=cobertes_2009&STYLES=&FORMAT=image/png&BGCOLOR=0xFFFFFF&TRANSPARENT=TRUE&CRS=EPSG:25831&BBOX=374110.828167253,4639230.79853085,452621.120632226,4703578.45000215&WIDTH=1020&HEIGHT=836"}],fgbLayers:[{name:"agrupacionsCensalsVigent",key:"agrupacions_censals_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/agrupacions_censals_vigent.fgb"},{name:"agrupacionsCensalsVigentText",key:"agrupacions_censals_vigent_text",url:"https://tilemaps.icgc.cat/vector/fgb/agrupacions_censals_vigent_text.fgb"},{name:"areesBasiquesPolicialsVigent",key:"arees_basiques_policials_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/arees_basiques_policials_vigent.fgb"},{name:"areesBasiquesPolicialsVigentText",key:"arees_basiques_policials_vigent_text",url:"https://tilemaps.icgc.cat/vector/fgb/arees_basiques_policials_vigent_text.fgb"},{name:"areesBasiquesSalutVigent",key:"arees_basiques_salut_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/arees_basiques_salut_vigent.fgb"},{name:"areesBasiquesServeisSocialsVigent",key:"arees_basiques_serveis_socials_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/arees_basiques_serveis_socials_vigent.fgb"},{name:"areesBasiquesServeisSocialsVigentText",key:"arees_basiques_serveis_socials_vigent_text",url:"https://tilemaps.icgc.cat/vector/fgb/arees_basiques_serveis_socials_vigent_text.fgb"},{name:"areesGestioAssistencialVigent",key:"arees_gestio_assistencial_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/arees_gestio_assistencial_vigent.fgb"},{name:"areesHidrogeologiquesAquifersVigent",key:"arees_hidrogeologiques_aquifers_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/arees_hidrogeologiques_aquifers_vigent.fgb"},{name:"catalunyaVigent",key:"catalunya_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/catalunya_vigent.fgb"},{name:"catalunyaVigentText",key:"catalunya_vigent_text",url:"https://tilemaps.icgc.cat/vector/fgb/catalunya_vigent_text.fgb"},{name:"comarquesVigent",key:"comarques_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/comarques_vigent.fgb"},{name:"comarquesVigentText",key:"comarques_vigent_text",url:"https://tilemaps.icgc.cat/vector/fgb/comarques_vigent_text.fgb"},{name:"districtesCensalsVigent",key:"districtes_censals_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/districtes_censals_vigent.fgb"},{name:"districtesCensalsVigentText",key:"districtes_censals_vigent_text",url:"https://tilemaps.icgc.cat/vector/fgb/districtes_censals_vigent_text.fgb"},{name:"incendisForestalsVigent",key:"incendis_forestals_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/incendis_forestals_vigent.fgb"},{name:"incendisForestalsVigentText",key:"incendis_forestals_vigent_text",url:"https://tilemaps.icgc.cat/vector/fgb/incendis_forestals_vigent_text.fgb"},{name:"municipisVigent",key:"municipis_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/municipis_vigent.fgb"},{name:"municipisVigentText",key:"municipis_vigent_text",url:"https://tilemaps.icgc.cat/vector/fgb/municipis_vigent_text.fgb"},{name:"partitsJudicialsVigent",key:"partits_judicials_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/partits_judicials_vigent.fgb"},{name:"partitsJudicialsVigentText",key:"partits_judicials_vigent_text",url:"https://tilemaps.icgc.cat/vector/fgb/partits_judicials_vigent_text.fgb"},{name:"plaTerritorialVigent",key:"pla_territorial_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/pla_territorial_vigent.fgb"},{name:"plaTerritorialVigentText",key:"pla_territorial_vigent_text",url:"https://tilemaps.icgc.cat/vector/fgb/pla_territorial_vigent_text.fgb"},{name:"provinciesVigent",key:"provincies_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/provincies_vigent.fgb"},{name:"provinciesVigentText",key:"provincies_vigent_text",url:"https://tilemaps.icgc.cat/vector/fgb/provincies_vigent_text.fgb"},{name:"regionsPolicialsVigent",key:"regions_policials_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/regions_policials_vigent.fgb"},{name:"regionsPolicialsVigentText",key:"regions_policials_vigent_text",url:"https://tilemaps.icgc.cat/vector/fgb/regions_policials_vigent_text.fgb"},{name:"regionsSanitariesVigent",key:"regions_sanitaries_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/regions_sanitaries_vigent.fgb"},{name:"regionsSanitariesVigentText",key:"regions_sanitaries_vigent_text",url:"https://tilemaps.icgc.cat/vector/fgb/regions_sanitaries_vigent_text.fgb"},{name:"seccionsCensalsVigent",key:"seccions_censals_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/seccions_censals_vigent.fgb"},{name:"seccionsCensalsVigentText",key:"seccions_censals_vigent_text",url:"https://tilemaps.icgc.cat/vector/fgb/seccions_censals_vigent_text.fgb"},{name:"sectorsSanitarisVigent",key:"sectors_sanitaris_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/sectors_sanitaris_vigent.fgb"},{name:"vegueriesVigent",key:"vegueries_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/vegueries_vigent.fgb"},{name:"vegueriesVigentText",key:"vegueries_vigent_text",url:"https://tilemaps.icgc.cat/vector/fgb/vegueries_vigent_text.fgb"}]},Styles:{TOPO:"https://geoserveis.icgc.cat/contextmaps/icgc_mapa_estandard.json",ORTO:"https://geoserveis.icgc.cat/contextmaps/icgc_orto_estandard.json",ORTO3D:"https://tilemaps.icgc.cat/cdn/styles/icgc_orto_3d.json",ADMIN:"https://geoserveis.icgc.cat/contextmaps/icgc_delimitacio_limits_administratius.json",DARK:"https://geoserveis.icgc.cat/contextmaps/icgc_mapa_base_fosc.json",LIGHT:"https://geoserveis.icgc.cat/contextmaps/icgc_mapa_base_gris.json",GEOLOGY:"https://geoserveis.icgc.cat/contextmaps/icgc_geologic_informacio.json"},Terrains:{ICGC5M:"https://tilemaps.icgc.cat/tileserver/tileserver/terreny-5m-30m-rgb-extent/{z}/{x}/{y}.png",WORLD30M:"https://s3.amazonaws.com/elevation-tiles-prod/terrarium/{z}/{x}/{y}.png"},Layers:{Orto:{ortofotoColorProvisional:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_provisional",ortofotoColor2022:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2022",ortofotoColor2021:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2021",ortofotoColor2020:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2020",ortofotoColor2019:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2019",ortofotoColor2018:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2018",ortofotoColor2017:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2017",ortofotoColor2016:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2016",ortofotoColor2015:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2015",ortofotoColor2014:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2014",ortofotoColor2013:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2013",ortofotoColor2012:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2012",ortofotoColor2011:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2011",ortofotoColor2010:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2010",ortofotoColor2009:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2009",ortofotoColor2008:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2008",ortofotoColor20062007:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2006-2007",ortofotoColor20042005:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2004-2005",ortofotoColor20002003:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2000-2003",ortofotoBlancINegre1998:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_blanc_i_negre_1998",ortofotoBlancINegre19941997:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_blanc_i_negre_1994-1997",ortofotoColor1993:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_1993",ortofotoBlancINegre19831992:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_blanc_i_negre_1983-1992",ortofotoBlancINegre19701977:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_blanc_i_negre_1970-1977",ortofotoBlancINegre1956:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_blanc_i_negre_1956",ortofotoBlancINegre1945:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_blanc_i_negre_1945",ortofotoColorSerieAnual:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_serie_anual",ortofotoInfraroigProvisional:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_provisional",ortofotoInfraroig2022:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2022",ortofotoInfraroig2021:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2021",ortofotoInfraroig2020:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2020",ortofotoInfraroig2019:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2019",ortofotoInfraroig2018:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2018",ortofotoInfraroig2017:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2017",ortofotoInfraroig2016:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2016",ortofotoInfraroig2015:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2015",ortofotoInfraroig2014:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2014",ortofotoInfraroig2013:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2013",ortofotoInfraroig2012:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2012",ortofotoInfraroig2011:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2011",ortofotoInfraroig2010:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2010",ortofotoInfraroig2009:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2009",ortofotoInfraroig2008:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2008",ortofotoInfraroig20062007:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2006-2007",ortofotoInfraroig19961997:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_1996-1997",ortofotoInfraroigSerieAnual:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_serie_anual"},VectorAdmin:{agrupacionsCensals2015:"agrupacions_censals_2015",agrupacionsCensals2016:"agrupacions_censals_2016",agrupacionsCensals2017:"agrupacions_censals_2017",agrupacionsCensals2018:"agrupacions_censals_2018",agrupacionsCensals2019:"agrupacions_censals_2019",agrupacionsCensals2020:"agrupacions_censals_2020",agrupacionsCensals2021:"agrupacions_censals_2021",agrupacionsCensalsVigent:"agrupacions_censals_vigent",agrupacionsCensalsVigentText:"agrupacions_censals_vigent_text",areesBasiquesPolicials2019:"arees_basiques_policials_2019",areesBasiquesPolicials2020:"arees_basiques_policials_2020",areesBasiquesPolicials2022:"arees_basiques_policials_2022",areesBasiquesPolicialsVigent:"arees_basiques_policials_vigent",areesBasiquesPolicialsVigentText:"arees_basiques_policials_vigent_text",areesBasiquesSalutVigent:"arees_basiques_salut_vigent",areesBasiquesServeisSocialsVigent:"arees_basiques_serveis_socials_vigent",areesBasiquesServeisSocialsVigentText:"arees_basiques_serveis_socials_vigent_text",areesGestioAssistencialVigent:"arees_gestio_assistencial_vigent",areesHidrogeologiquesAquifersVigent:"arees_hidrogeologiques_aquifers_vigent",catalunyaVigent:"catalunya_vigent",catalunyaVigentText:"catalunya_vigent_text",comarques2022:"comarques_2022",comarquesVigent:"comarques_vigent",comarquesVigentText:"comarques_vigent_text",districtesCensals2015:"districtes_censals_2015",districtesCensals2016:"districtes_censals_2016",districtesCensals2017:"districtes_censals_2017",districtesCensals2018:"districtes_censals_2018",districtesCensals2019:"districtes_censals_2019",districtesCensals2020:"districtes_censals_2020",districtesCensals2021:"districtes_censals_2021",districtesCensals2022:"districtes_censals_2022",districtesCensalsVigent:"districtes_censals_vigent",districtesCensalsVigentText:"districtes_censals_vigent_text",incendisForestalsVigent:"incendis_forestals_vigent",incendisForestalsVigentText:"incendis_forestals_vigent_text",municipis2022:"municipis_2022",municipis2022Text:"municipis_2022_text",municipisVigent:"municipis_vigent",municipisVigentText:"municipis_vigent_text",partitsJudicialsVigent:"partits_judicials_vigent",partitsJudicialsVigentText:"partits_judicials_vigent_text",plaTerritorial2015:"pla_territorial_2015",plaTerritorialVigent:"pla_territorial_vigent",plaTerritorialVigentText:"pla_territorial_vigent_text",provinciesVigent:"provincies_vigent",provinciesVigentText:"provincies_vigent_text",regionsPolicialsVigent:"regions_policials_vigent",regionsPolicialsVigentText:"regions_policials_vigent_text",regionsSanitariesVigent:"regions_sanitaries_vigent",regionsSanitariesVigentText:"regions_sanitaries_vigent_text",seccionsCensals2015:"seccions_censals_2015",seccionsCensals2016:"seccions_censals_2016",seccionsCensals2017:"seccions_censals_2017",seccionsCensals2018:"seccions_censals_2018",seccionsCensals2019:"seccions_censals_2019",seccionsCensals2020:"seccions_censals_2020",seccionsCensals2021:"seccions_censals_2021",seccionsCensals2022:"seccions_censals_2022",seccionsCensalsVigent:"seccions_censals_vigent",seccionsCensalsVigentText:"seccions_censals_vigent_text",sectorsSanitarisVigent:"sectors_sanitaris_vigent",vegueriesVigent:"vegueries_vigent",vegueriesVigentText:"vegueries_vigent_text"},FGBAdmin:{agrupacionsCensalsVigent:"https://tilemaps.icgc.cat/vector/fgb/agrupacions_censals_vigent.fgb",agrupacionsCensalsVigentText:"https://tilemaps.icgc.cat/vector/fgb/agrupacions_censals_vigent_text.fgb",areesBasiquesPolicialsVigent:"https://tilemaps.icgc.cat/vector/fgb/arees_basiques_policials_vigent.fgb",areesBasiquesPolicialsVigentText:"https://tilemaps.icgc.cat/vector/fgb/arees_basiques_policials_vigent_text.fgb",areesBasiquesSalutVigent:"https://tilemaps.icgc.cat/vector/fgb/arees_basiques_salut_vigent.fgb",areesBasiquesServeisSocialsVigent:"https://tilemaps.icgc.cat/vector/fgb/arees_basiques_serveis_socials_vigent.fgb",areesBasiquesServeisSocialsVigentText:"https://tilemaps.icgc.cat/vector/fgb/arees_basiques_serveis_socials_vigent_text.fgb",areesGestioAssistencialVigent:"https://tilemaps.icgc.cat/vector/fgb/arees_gestio_assistencial_vigent.fgb",areesHidrogeologiquesAquifersVigent:"https://tilemaps.icgc.cat/vector/fgb/arees_hidrogeologiques_aquifers_vigent.fgb",catalunyaVigent:"https://tilemaps.icgc.cat/vector/fgb/catalunya_vigent.fgb",catalunyaVigentText:"https://tilemaps.icgc.cat/vector/fgb/catalunya_vigent_text.fgb",comarquesVigent:"https://tilemaps.icgc.cat/vector/fgb/comarques_vigent.fgb",comarquesVigentText:"https://tilemaps.icgc.cat/vector/fgb/comarques_vigent_text.fgb",districtesCensalsVigent:"https://tilemaps.icgc.cat/vector/fgb/districtes_censals_vigent.fgb",districtesCensalsVigentText:"https://tilemaps.icgc.cat/vector/fgb/districtes_censals_vigent_text.fgb",incendisForestalsVigent:"https://tilemaps.icgc.cat/vector/fgb/incendis_forestals_vigent.fgb",incendisForestalsVigentText:"https://tilemaps.icgc.cat/vector/fgb/incendis_forestals_vigent_text.fgb",municipisVigent:"https://tilemaps.icgc.cat/vector/fgb/municipis_vigent.fgb",municipisVigentText:"https://tilemaps.icgc.cat/vector/fgb/municipis_vigent_text.fgb",partitsJudicialsVigent:"https://tilemaps.icgc.cat/vector/fgb/partits_judicials_vigent.fgb",partitsJudicialsVigentText:"https://tilemaps.icgc.cat/vector/fgb/partits_judicials_vigent_text.fgb",plaTerritorialVigent:"https://tilemaps.icgc.cat/vector/fgb/pla_territorial_vigent.fgb",plaTerritorialVigentText:"https://tilemaps.icgc.cat/vector/fgb/pla_territorial_vigent_text.fgb",provinciesVigent:"https://tilemaps.icgc.cat/vector/fgb/provincies_vigent.fgb",provinciesVigentText:"https://tilemaps.icgc.cat/vector/fgb/provincies_vigent_text.fgb",regionsPolicialsVigent:"https://tilemaps.icgc.cat/vector/fgb/regions_policials_vigent.fgb",regionsPolicialsVigentText:"https://tilemaps.icgc.cat/vector/fgb/regions_policials_vigent_text.fgb",regionsSanitariesVigent:"https://tilemaps.icgc.cat/vector/fgb/regions_sanitaries_vigent.fgb",regionsSanitariesVigentText:"https://tilemaps.icgc.cat/vector/fgb/regions_sanitaries_vigent_text.fgb",seccionsCensalsVigent:"https://tilemaps.icgc.cat/vector/fgb/seccions_censals_vigent.fgb",seccionsCensalsVigentText:"https://tilemaps.icgc.cat/vector/fgb/seccions_censals_vigent_text.fgb",sectorsSanitarisVigent:"https://tilemaps.icgc.cat/vector/fgb/sectors_sanitaris_vigent.fgb",vegueriesVigent:"https://tilemaps.icgc.cat/vector/fgb/vegueries_vigent.fgb",vegueriesVigentText:"https://tilemaps.icgc.cat/vector/fgb/vegueries_vigent_text.fgb"},Vector:{cobertes2018:"https://tilemaps.icgc.cat/tileserver/cobertes_tilejson.json"},WMS:{espaisInteresGeologic:"https://geoserveis.icgc.cat/servei/catalunya/espais-interes-geologic/wms/service?&service=WMS&request=GetMap&layers=espais-interes-geologic&styles=&format=image%2Fpng&transparent=true&version=1.1.1&tipus=wms&width=512&height=512&srs=EPSG%3A3857&bbox={bbox-epsg-3857}",gravimetriaBouguer500000:"https://geoserveis.icgc.cat/servei/catalunya/gravimetria/wms/service?&service=WMS&request=GetMap&layers=anomalia_bouguer_500000&styles=&format=image%2Fpng&transparent=true&version=1.1.1&tipus=wms&width=512&height=512&srs=EPSG%3A3857&bbox={bbox-epsg-3857}",cobertesSol2018:"https://geoserveis.icgc.cat/servei/catalunya/cobertes-sol/wms/service?&service=WMS&request=GetMap&layers=cobertes_2018&styles=&format=image%2Fpng&transparent=true&version=1.1.1&tipus=wms&width=512&height=512&srs=EPSG%3A3857&bbox={bbox-epsg-3857}",administratiu:"http://geoserveis.icgc.cat/servei/catalunya/mapa-base/wmts/administratiu/MON3857NW/{z}/{x}/{y}.png",simplificat:"http://geoserveis.icgc.cat/servei/catalunya/mapa-base/wmts/simplificat/MON3857NW/{z}/{x}/{y}.png",cims:"https://geoserveis.icgc.cat/icc_100cims/wms/service?REQUEST=GetMap&SERVICE=WMS&VERSION=1.1.1&LAYERS=0&STYLES=&FORMAT=image/png&BGCOLOR=0xFFFFFF&TRANSPARENT=TRUE&SRS=EPSG:25831&BBOX=137118.923076923,4488408.75,650959.076923077,4749634.75&WIDTH=895&HEIGHT=455",cobertesSol:"http://geoserveis.icgc.cat/servei/catalunya/cobertes-sol/wms?REQUEST=GetMap&SERVICE=WMS&VERSION=1.3.0&LAYERS=cobertes_2009&STYLES=&FORMAT=image/png&BGCOLOR=0xFFFFFF&TRANSPARENT=TRUE&CRS=EPSG:25831&BBOX=374110.828167253,4639230.79853085,452621.120632226,4703578.45000215&WIDTH=1020&HEIGHT=836"}}},xy=T2.Terrains,Sf=T2.Styles,Ti=T2.Layers,Hn={limitsUrl:"https://tilemaps.icgc.cat/vt/limits-tilejsonV3.json",geocoder:{peliasUrl1:"https://eines.icgc.cat/geocodificador/autocompletar?text=",peliasUrl2:"&layers=topo1%2Ctopo2%2Caddress&size=5"},mapOptions:{container:"map",center:{0:1.537786,1:41.837539},zoom:7.5,bearing:0,pitch:0,hash:!1,style:"https://geoserveis.icgc.cat/contextmaps/icgc_mapa_base_gris.json.json",maxZoom:18,maxPitch:85},logoIcgcOptions:{logoUrlColor:"https://tilemaps.icgc.cat/cdn/logos/icgc_logo_color.png",logoUrlWhite:"https://tilemaps.icgc.cat/cdn/logos/icgc_logo_blanc.svg",logoLink:"https://www.icgc.cat",logoTitle:"Institut Cartogràfic i Geològic de Catalunya",logoWidth:100},logoGencatOptions:{logoUrlColor:"https://tilemaps.icgc.cat/cdn/logos/gencat_logo_color.png",logoUrlWhite:"https://tilemaps.icgc.cat/cdn/logos/gencat_logo_blanc.png",logoLink:"https://web.gencat.cat/",logoTitle:"Generalitat de Catalunya",logoWidth:100},map3dOptions:{spaceErrorFactor:2,exaggeration:1,zfactor:48,minZoomRange:15.5,maxZoomRange:22,urlTilesetCities:"https://tilemaps.icgc.cat/vector/3dtiles/ciutats/v1/tilesetV1.0.json",layerIdOrder:"place-isolated",sourceLayerFilterId:"place",minZoomFilter:14,layerId3d:"edificisMapboxLayer",terrainSource:"ICGC5M",style3dName:"orto3d",imageIcon:"https://tilemaps.icgc.cat/cdn/images/stick.png"},baseStyles:{0:{key:"TOPO",url:"https://geoserveis.icgc.cat/contextmaps/icgc_mapa_estandard_general.json",image:"https://visors.icgc.cat/contextmaps/imatges_estil/icgc_mapa_estandard.png"},1:{key:"ORTO",url:"https://geoserveis.icgc.cat/contextmaps/icgc_orto_estandard.json",image:"https://visors.icgc.cat/contextmaps/imatges_estil/icgc_orto_hibrida.png"},2:{key:"ORTO3D",url:"https://tilemaps.icgc.cat/cdn/styles/icgc_orto_3d.json",image:"https://visors.icgc.cat/contextmaps/imatges_estil/icgc_orto_hibrida.png"},3:{key:"ADMIN",url:"https://geoserveis.icgc.cat/contextmaps/icgc_delimitacio_limits_administratius.json",image:"https://visors.icgc.cat/contextmaps/imatges_estil/icgc_delimitacio_limits_administratius.png"},4:{key:"DARK",url:"https://geoserveis.icgc.cat/contextmaps/icgc_mapa_base_fosc.json",image:"https://visors.icgc.cat/contextmaps/imatges_estil/icgc_mapa_base_fosc.png"},5:{key:"LIGHT",url:"https://geoserveis.icgc.cat/contextmaps/icgc_mapa_base_gris.json",image:"https://visors.icgc.cat/contextmaps/imatges_estil/icgc_mapa_base_gris.png"},6:{key:"GEOLOGY",url:"https://geoserveis.icgc.cat/contextmaps/icgc_geologic_informacio.json",image:"https://visors.icgc.cat/contextmaps/imatges_estil/icgc_geologic_informacio.png"}},urlTerrainICGC:{0:{name:"ICGC5M",url:"https://tilemaps.icgc.cat/tileserver/tileserver/terreny-5m-30m-rgb-extent/{z}/{x}/{y}.png"},1:{name:"WORLD30M",url:"https://s3.amazonaws.com/elevation-tiles-prod/terrarium/{z}/{x}/{y}.png",encoding:"terrarium"}},ortoLayersICGC:{0:{name:"ortofotoColorProvisional",key:"ortofoto_color_provisional",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_provisional"},1:{name:"ortofotoColor2022",key:"ortofoto_color_2022",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2022"},2:{name:"ortofotoColor2021",key:"ortofoto_color_2021",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2021"},3:{name:"ortofotoColor2020",key:"ortofoto_color_2020",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2020"},4:{name:"ortofotoColor2019",key:"ortofoto_color_2019",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2019"},5:{name:"ortofotoColor2018",key:"ortofoto_color_2018",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2018"},6:{name:"ortofotoColor2017",key:"ortofoto_color_2017",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2017"},7:{name:"ortofotoColor2016",key:"ortofoto_color_2016",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2016"},8:{name:"ortofotoColor2015",key:"ortofoto_color_2015",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2015"},9:{name:"ortofotoColor2014",key:"ortofoto_color_2014",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2014"},10:{name:"ortofotoColor2013",key:"ortofoto_color_2013",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2013"},11:{name:"ortofotoColor2012",key:"ortofoto_color_2012",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2012"},12:{name:"ortofotoColor2011",key:"ortofoto_color_2011",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2011"},13:{name:"ortofotoColor2010",key:"ortofoto_color_2010",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2010"},14:{name:"ortofotoColor2009",key:"ortofoto_color_2009",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2009"},15:{name:"ortofotoColor2008",key:"ortofoto_color_2008",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2008"},16:{name:"ortofotoColor20062007",key:"ortofoto_color_2006-2007",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2006-2007"},17:{name:"ortofotoColor20042005",key:"ortofoto_color_2004-2005",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2004-2005"},18:{name:"ortofotoColor20002003",key:"ortofoto_color_2000-2003",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2000-2003"},19:{name:"ortofotoBlancINegre1998",key:"ortofoto_blanc_i_negre_1998",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_blanc_i_negre_1998"},20:{name:"ortofotoBlancINegre19941997",key:"ortofoto_blanc_i_negre_1994-1997",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_blanc_i_negre_1994-1997"},21:{name:"ortofotoColor1993",key:"ortofoto_color_1993",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_1993"},22:{name:"ortofotoBlancINegre19831992",key:"ortofoto_blanc_i_negre_1983-1992",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_blanc_i_negre_1983-1992"},23:{name:"ortofotoBlancINegre19701977",key:"ortofoto_blanc_i_negre_1970-1977",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_blanc_i_negre_1970-1977"},24:{name:"ortofotoBlancINegre1956",key:"ortofoto_blanc_i_negre_1956",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_blanc_i_negre_1956"},25:{name:"ortofotoBlancINegre1945",key:"ortofoto_blanc_i_negre_1945",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_blanc_i_negre_1945"},26:{name:"ortofotoColorSerieAnual",key:"ortofoto_color_serie_anual",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_serie_anual"},27:{name:"ortofotoInfraroigProvisional",key:"ortofoto_infraroig_provisional",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_provisional"},28:{name:"ortofotoInfraroig2022",key:"ortofoto_infraroig_2022",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2022"},29:{name:"ortofotoInfraroig2021",key:"ortofoto_infraroig_2021",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2021"},30:{name:"ortofotoInfraroig2020",key:"ortofoto_infraroig_2020",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2020"},31:{name:"ortofotoInfraroig2019",key:"ortofoto_infraroig_2019",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2019"},32:{name:"ortofotoInfraroig2018",key:"ortofoto_infraroig_2018",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2018"},33:{name:"ortofotoInfraroig2017",key:"ortofoto_infraroig_2017",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2017"},34:{name:"ortofotoInfraroig2016",key:"ortofoto_infraroig_2016",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2016"},35:{name:"ortofotoInfraroig2015",key:"ortofoto_infraroig_2015",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2015"},36:{name:"ortofotoInfraroig2014",key:"ortofoto_infraroig_2014",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2014"},37:{name:"ortofotoInfraroig2013",key:"ortofoto_infraroig_2013",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2013"},38:{name:"ortofotoInfraroig2012",key:"ortofoto_infraroig_2012",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2012"},39:{name:"ortofotoInfraroig2011",key:"ortofoto_infraroig_2011",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2011"},40:{name:"ortofotoInfraroig2010",key:"ortofoto_infraroig_2010",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2010"},41:{name:"ortofotoInfraroig2009",key:"ortofoto_infraroig_2009",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2009"},42:{name:"ortofotoInfraroig2008",key:"ortofoto_infraroig_2008",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2008"},43:{name:"ortofotoInfraroig20062007",key:"ortofoto_infraroig_2006-2007",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2006-2007"},44:{name:"ortofotoInfraroig19961997",key:"ortofoto_infraroig_1996-1997",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_1996-1997"},45:{name:"ortofotoInfraroigSerieAnual",key:"ortofoto_infraroig_serie_anual",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_serie_anual"}},vectorLayersICGC:{0:{name:"agrupacionsCensals2015",key:"agrupacions_censals_2015"},1:{name:"agrupacionsCensals2016",key:"agrupacions_censals_2016"},2:{name:"agrupacionsCensals2017",key:"agrupacions_censals_2017"},3:{name:"agrupacionsCensals2018",key:"agrupacions_censals_2018"},4:{name:"agrupacionsCensals2019",key:"agrupacions_censals_2019"},5:{name:"agrupacionsCensals2020",key:"agrupacions_censals_2020"},6:{name:"agrupacionsCensals2021",key:"agrupacions_censals_2021"},7:{name:"agrupacionsCensalsVigent",key:"agrupacions_censals_vigent"},8:{name:"agrupacionsCensalsVigentText",key:"agrupacions_censals_vigent_text"},9:{name:"areesBasiquesPolicials2019",key:"arees_basiques_policials_2019"},10:{name:"areesBasiquesPolicials2020",key:"arees_basiques_policials_2020"},11:{name:"areesBasiquesPolicials2022",key:"arees_basiques_policials_2022"},12:{name:"areesBasiquesPolicialsVigent",key:"arees_basiques_policials_vigent"},13:{name:"areesBasiquesPolicialsVigentText",key:"arees_basiques_policials_vigent_text"},14:{name:"areesBasiquesSalutVigent",key:"arees_basiques_salut_vigent"},15:{name:"areesBasiquesServeisSocialsVigent",key:"arees_basiques_serveis_socials_vigent"},16:{name:"areesBasiquesServeisSocialsVigentText",key:"arees_basiques_serveis_socials_vigent_text"},17:{name:"areesGestioAssistencialVigent",key:"arees_gestio_assistencial_vigent"},18:{name:"areesHidrogeologiquesAquifersVigent",key:"arees_hidrogeologiques_aquifers_vigent"},19:{name:"catalunyaVigent",key:"catalunya_vigent"},20:{name:"catalunyaVigentText",key:"catalunya_vigent_text"},21:{name:"comarques2022",key:"comarques_2022"},22:{name:"comarquesVigent",key:"comarques_vigent"},23:{name:"comarquesVigentText",key:"comarques_vigent_text"},24:{name:"districtesCensals2015",key:"districtes_censals_2015"},25:{name:"districtesCensals2016",key:"districtes_censals_2016"},26:{name:"districtesCensals2017",key:"districtes_censals_2017"},27:{name:"districtesCensals2018",key:"districtes_censals_2018"},28:{name:"districtesCensals2019",key:"districtes_censals_2019"},29:{name:"districtesCensals2020",key:"districtes_censals_2020"},30:{name:"districtesCensals2021",key:"districtes_censals_2021"},31:{name:"districtesCensals2022",key:"districtes_censals_2022"},32:{name:"districtesCensalsVigent",key:"districtes_censals_vigent"},33:{name:"districtesCensalsVigentText",key:"districtes_censals_vigent_text"},34:{name:"incendisForestalsVigent",key:"incendis_forestals_vigent"},35:{name:"incendisForestalsVigentText",key:"incendis_forestals_vigent_text"},36:{name:"municipis2022",key:"municipis_2022"},37:{name:"municipis2022Text",key:"municipis_2022_text"},38:{name:"municipisVigent",key:"municipis_vigent"},39:{name:"municipisVigentText",key:"municipis_vigent_text"},40:{name:"partitsJudicialsVigent",key:"partits_judicials_vigent"},41:{name:"partitsJudicialsVigentText",key:"partits_judicials_vigent_text"},42:{name:"plaTerritorial2015",key:"pla_territorial_2015"},43:{name:"plaTerritorialVigent",key:"pla_territorial_vigent"},44:{name:"plaTerritorialVigentText",key:"pla_territorial_vigent_text"},45:{name:"provinciesVigent",key:"provincies_vigent"},46:{name:"provinciesVigentText",key:"provincies_vigent_text"},47:{name:"regionsPolicialsVigent",key:"regions_policials_vigent"},48:{name:"regionsPolicialsVigentText",key:"regions_policials_vigent_text"},49:{name:"regionsSanitariesVigent",key:"regions_sanitaries_vigent"},50:{name:"regionsSanitariesVigentText",key:"regions_sanitaries_vigent_text"},51:{name:"seccionsCensals2015",key:"seccions_censals_2015"},52:{name:"seccionsCensals2016",key:"seccions_censals_2016"},53:{name:"seccionsCensals2017",key:"seccions_censals_2017"},54:{name:"seccionsCensals2018",key:"seccions_censals_2018"},55:{name:"seccionsCensals2019",key:"seccions_censals_2019"},56:{name:"seccionsCensals2020",key:"seccions_censals_2020"},57:{name:"seccionsCensals2021",key:"seccions_censals_2021"},58:{name:"seccionsCensals2022",key:"seccions_censals_2022"},59:{name:"seccionsCensalsVigent",key:"seccions_censals_vigent"},60:{name:"seccionsCensalsVigentText",key:"seccions_censals_vigent_text"},61:{name:"sectorsSanitarisVigent",key:"sectors_sanitaris_vigent"},62:{name:"vegueriesVigent",key:"vegueries_vigent"},63:{name:"vegueriesVigentText",key:"vegueries_vigent_text"}},vectorLayers:{0:{key:"cobertes2018",url:"https://tilemaps.icgc.cat/tileserver/cobertes_tilejson.json",legend:"https://tilemaps.icgc.cat/cdn/images/llegendaCobertesSol2018.jpg"}},wmsLayers:{0:{key:"espaisInteresGeologic",layer:"",url:"https://geoserveis.icgc.cat/servei/catalunya/espais-interes-geologic/wms/service?&service=WMS&request=GetMap&layers=espais-interes-geologic&styles=&format=image%2Fpng&transparent=true&version=1.1.1&tipus=wms&width=512&height=512&srs=EPSG%3A3857&bbox={bbox-epsg-3857}"},1:{key:"gravimetriaBouguer500000",layer:"",url:"https://geoserveis.icgc.cat/servei/catalunya/gravimetria/wms/service?&service=WMS&request=GetMap&layers=anomalia_bouguer_500000&styles=&format=image%2Fpng&transparent=true&version=1.1.1&tipus=wms&width=512&height=512&srs=EPSG%3A3857&bbox={bbox-epsg-3857}"},2:{key:"cobertesSol2018",layer:"",url:"https://geoserveis.icgc.cat/servei/catalunya/cobertes-sol/wms/service?&service=WMS&request=GetMap&layers=cobertes_2018&styles=&format=image%2Fpng&transparent=true&version=1.1.1&tipus=wms&width=512&height=512&srs=EPSG%3A3857&bbox={bbox-epsg-3857}"},3:{key:"administratiu",layer:"",url:"http://geoserveis.icgc.cat/servei/catalunya/mapa-base/wmts/administratiu/MON3857NW/{z}/{x}/{y}.png"},4:{key:"simplificat",layer:"",url:"http://geoserveis.icgc.cat/servei/catalunya/mapa-base/wmts/simplificat/MON3857NW/{z}/{x}/{y}.png"},5:{key:"cims",layer:"",url:"https://geoserveis.icgc.cat/icc_100cims/wms/service?REQUEST=GetMap&SERVICE=WMS&VERSION=1.1.1&LAYERS=0&STYLES=&FORMAT=image/png&BGCOLOR=0xFFFFFF&TRANSPARENT=TRUE&SRS=EPSG:25831&BBOX=137118.923076923,4488408.75,650959.076923077,4749634.75&WIDTH=895&HEIGHT=455"},6:{key:"cobertesSol",layer:"",url:"http://geoserveis.icgc.cat/servei/catalunya/cobertes-sol/wms?REQUEST=GetMap&SERVICE=WMS&VERSION=1.3.0&LAYERS=cobertes_2009&STYLES=&FORMAT=image/png&BGCOLOR=0xFFFFFF&TRANSPARENT=TRUE&CRS=EPSG:25831&BBOX=374110.828167253,4639230.79853085,452621.120632226,4703578.45000215&WIDTH=1020&HEIGHT=836"}},fgbLayers:{0:{name:"agrupacionsCensalsVigent",key:"agrupacions_censals_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/agrupacions_censals_vigent.fgb"},1:{name:"agrupacionsCensalsVigentText",key:"agrupacions_censals_vigent_text",url:"https://tilemaps.icgc.cat/vector/fgb/agrupacions_censals_vigent_text.fgb"},2:{name:"areesBasiquesPolicialsVigent",key:"arees_basiques_policials_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/arees_basiques_policials_vigent.fgb"},3:{name:"areesBasiquesPolicialsVigentText",key:"arees_basiques_policials_vigent_text",url:"https://tilemaps.icgc.cat/vector/fgb/arees_basiques_policials_vigent_text.fgb"},4:{name:"areesBasiquesSalutVigent",key:"arees_basiques_salut_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/arees_basiques_salut_vigent.fgb"},5:{name:"areesBasiquesServeisSocialsVigent",key:"arees_basiques_serveis_socials_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/arees_basiques_serveis_socials_vigent.fgb"},6:{name:"areesBasiquesServeisSocialsVigentText",key:"arees_basiques_serveis_socials_vigent_text",url:"https://tilemaps.icgc.cat/vector/fgb/arees_basiques_serveis_socials_vigent_text.fgb"},7:{name:"areesGestioAssistencialVigent",key:"arees_gestio_assistencial_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/arees_gestio_assistencial_vigent.fgb"},8:{name:"areesHidrogeologiquesAquifersVigent",key:"arees_hidrogeologiques_aquifers_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/arees_hidrogeologiques_aquifers_vigent.fgb"},9:{name:"catalunyaVigent",key:"catalunya_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/catalunya_vigent.fgb"},10:{name:"catalunyaVigentText",key:"catalunya_vigent_text",url:"https://tilemaps.icgc.cat/vector/fgb/catalunya_vigent_text.fgb"},11:{name:"comarquesVigent",key:"comarques_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/comarques_vigent.fgb"},12:{name:"comarquesVigentText",key:"comarques_vigent_text",url:"https://tilemaps.icgc.cat/vector/fgb/comarques_vigent_text.fgb"},13:{name:"districtesCensalsVigent",key:"districtes_censals_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/districtes_censals_vigent.fgb"},14:{name:"districtesCensalsVigentText",key:"districtes_censals_vigent_text",url:"https://tilemaps.icgc.cat/vector/fgb/districtes_censals_vigent_text.fgb"},15:{name:"incendisForestalsVigent",key:"incendis_forestals_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/incendis_forestals_vigent.fgb"},16:{name:"incendisForestalsVigentText",key:"incendis_forestals_vigent_text",url:"https://tilemaps.icgc.cat/vector/fgb/incendis_forestals_vigent_text.fgb"},17:{name:"municipisVigent",key:"municipis_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/municipis_vigent.fgb"},18:{name:"municipisVigentText",key:"municipis_vigent_text",url:"https://tilemaps.icgc.cat/vector/fgb/municipis_vigent_text.fgb"},19:{name:"partitsJudicialsVigent",key:"partits_judicials_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/partits_judicials_vigent.fgb"},20:{name:"partitsJudicialsVigentText",key:"partits_judicials_vigent_text",url:"https://tilemaps.icgc.cat/vector/fgb/partits_judicials_vigent_text.fgb"},21:{name:"plaTerritorialVigent",key:"pla_territorial_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/pla_territorial_vigent.fgb"},22:{name:"plaTerritorialVigentText",key:"pla_territorial_vigent_text",url:"https://tilemaps.icgc.cat/vector/fgb/pla_territorial_vigent_text.fgb"},23:{name:"provinciesVigent",key:"provincies_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/provincies_vigent.fgb"},24:{name:"provinciesVigentText",key:"provincies_vigent_text",url:"https://tilemaps.icgc.cat/vector/fgb/provincies_vigent_text.fgb"},25:{name:"regionsPolicialsVigent",key:"regions_policials_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/regions_policials_vigent.fgb"},26:{name:"regionsPolicialsVigentText",key:"regions_policials_vigent_text",url:"https://tilemaps.icgc.cat/vector/fgb/regions_policials_vigent_text.fgb"},27:{name:"regionsSanitariesVigent",key:"regions_sanitaries_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/regions_sanitaries_vigent.fgb"},28:{name:"regionsSanitariesVigentText",key:"regions_sanitaries_vigent_text",url:"https://tilemaps.icgc.cat/vector/fgb/regions_sanitaries_vigent_text.fgb"},29:{name:"seccionsCensalsVigent",key:"seccions_censals_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/seccions_censals_vigent.fgb"},30:{name:"seccionsCensalsVigentText",key:"seccions_censals_vigent_text",url:"https://tilemaps.icgc.cat/vector/fgb/seccions_censals_vigent_text.fgb"},31:{name:"sectorsSanitarisVigent",key:"sectors_sanitaris_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/sectors_sanitaris_vigent.fgb"},32:{name:"vegueriesVigent",key:"vegueries_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/vegueries_vigent.fgb"},33:{name:"vegueriesVigentText",key:"vegueries_vigent_text",url:"https://tilemaps.icgc.cat/vector/fgb/vegueries_vigent_text.fgb"}}};let jre=class{constructor(e){this.initTheMap(e)}initTheMap(e){if(!e)e=Hn.mapOptions;else for(const t in Hn.mapOptions){let n=[Hn.mapOptions.center[0],Hn.mapOptions.center[1]];Hn.mapOptions.center=n,e.hasOwnProperty(t)||(e[t]=Hn.mapOptions[t])}e.maxPitch=85,e.maplibreLogo=!1,e.attributionControl=!1,this.map=new Ts.Map(e),this.map.options=e,this.map.addControl(new Ts.AttributionControl({compact:!0})),this.map.on("load",async()=>{const t=this.map.getStyle().name,n=this.map.options.style;if(window.document.querySelector(".maplibregl-compact-show")){var i=window.document.querySelector(".maplibregl-compact-show");i.classList.remove("maplibregl-compact-show")}this.map.addControl(new Hre({color:n.indexOf("orto")===-1,defaultOptions:Hn}),"bottom-left"),this._dealOrto3dStyle(t)})}addGeocoderICGC(e){try{e===void 0&&(e="top-right");let t={collapsed:!0,marker:!0,popup:!0,showResultMarkers:!0,maplibregl:Ts,showResultsWhileTyping:!0,minLength:2};const n={forwardGeocode:async s=>{const a=[];try{const o=Hn.geocoder.peliasUrl1+encodeURIComponent(s.query)+Hn.geocoder.peliasUrl2,f=await(await fetch(o)).json();for(const m of f.features){const v=m.geometry.coordinates,x={type:"Feature",geometry:{type:"Point",coordinates:v},place_name:m.properties.label,properties:m.properties,text:m.properties.label,place_type:["place"],center:v};a.push(x)}}catch(o){console.error(`Failed to forwardGeocode with error: ${o}`)}return{features:a}}};this.map.addControl(new Qre(n,t),e);let i=document.getElementsByClassName("maplibregl-ctrl-geocoder--input");i[0].attributes[2].nodeValue="Cerca...",i[0].addEventListener("input",function(s){s.target.value.length>3})}catch(t){console.error(`Error adding ICGC geocoder: ${t.message}`)}}getStyle(){try{return this.map.getStyle()}catch(e){console.error(`Error getting style: ${e.message}`)}}async loadImage(e){try{return this.map.loadImage(e)}catch(t){console.error(`Error getting loadImage: ${t.message}`)}}addImage(e,t){try{return this.map.addImage(e,t)}catch(n){console.error(`Error getting addImage: ${n.message}`)}}getConfigStyles(){try{let e=[];for(const t of Sf)e.push(t.name);return e}catch(e){console.error(`Error retrieving base styles: ${e.message}`)}}getConfigWMSLayers(){try{let e=[];for(const t in Ti.WMS)Ti.WMS.hasOwnProperty(t)&&e.push(t);return e}catch(e){console.error(`Error retrieving WMS layers: ${e.message}`)}}getConfigOrtoLayers(){try{let e=[];for(const t in Ti.Orto)Ti.Orto.hasOwnProperty(t)&&e.push(t);return e}catch(e){console.error(`Error retrieving orto image layers: ${e.message}`)}}getConfigVectorLayers(){try{let e=[];for(const t in Ti.Vector)Ti.Vector.hasOwnProperty(t)&&e.push(t);return e}catch(e){console.error(`Error retrieving vector layers: ${e.message}`)}}getConfigVectorAdminLayers(){try{let e=[];for(const t in Ti.VectorAdmin)Ti.VectorAdmin.hasOwnProperty(t)&&e.push(t);return e}catch(e){console.error(`Error retrieving vectorAdmin layers: ${e.message}`)}}getConfigFGBAdminLayers(){try{let e=[];for(const t in Ti.FGBAdmin)Ti.FGBAdmin.hasOwnProperty(t)&&e.push(t);return e}catch(e){console.error(`Error retrieving FGBAdmin layers: ${e.message}`)}}async fetchData(e,t,n,i){try{if(e.includes(".fgb"))this.addFGBLayerICGC(e,n,null,i);else{const a=await(await fetch(e)).json();let o=t,A="";n==="labels"&&(A=this._firstSymbolLayer()),n==="lines"&&(A=this._firstLineLayer());let f=a.features[0].geometry.type;f.includes("ine")&&(i!==void 0?map.addLayer({id:o,type:"line",source:{type:"geojson",data:a},layout:{visibility:"visible"},paint:i},A):map.addLayer({id:o,type:"line",source:{type:"geojson",data:a},layout:{visibility:"visible"},paint:{"line-color":"black","line-width":2,"line-opacity":1}},A)),f.includes("olygon")&&(i!==void 0?map.addLayer({id:o,type:"fill",source:{type:"geojson",data:a},layout:{visibility:"visible"},paint:i},A):map.addLayer({id:o,type:"fill",source:{type:"geojson",data:a},layout:{visibility:"visible"},paint:{"fill-color":"blue","fill-opacity":.6}},A)),f.includes("oint")&&(i!==void 0?map.addLayer({id:o,type:"circle",source:{type:"geojson",data:a},layout:{visibility:"visible"},paint:i},A):map.addLayer({id:o,type:"circle",source:{type:"geojson",data:a},layout:{visibility:"visible"},paint:{"circle-color":"red","circle-opacity":.85}},A))}}catch(s){console.error(`Error fetching data: ${s.message}`)}}async fetchDataAndMenu(e,t,n,i,s){try{const a=document.getElementById("menu-group");let o="visible",A="";i==="labels"&&(A=this._firstSymbolLayer()),i==="lines"&&(A=this._firstLineLayer());let f;if(e.includes(".fgb")){let x=function(Q){for(const N in Ti.FGBAdmin)if(Ti.FGBAdmin.hasOwnProperty(N)&&Ti.FGBAdmin[N]===Q)return N;return null}(e);x===null&&(x="userFGB");const C=await fetch(e),M={type:"FeatureCollection",features:[]};for await(const Q of YE(C.body))M.features.push(Q);f=M;let U=x;if(this.map.addSource(U,{type:"geojson",data:M}),e.includes("text"))this.map.addLayer({id:x,type:"symbol",source:U,layout:{"text-letter-spacing":.1,"text-size":{base:1.2,stops:[[8,0],[12,14],[15,15]]},"text-font":["FiraSans-Regular"],"text-field":["get","NOM_AC"],"text-transform":"none","text-max-width":25,visibility:o,"text-justify":"right","text-anchor":"top","text-allow-overlap":!1,"symbol-spacing":2,"text-line-height":1},paint:{"text-halo-blur":.5,"text-color":"rgba(90, 7, 7, 1)","text-halo-width":2,"text-halo-color":"rgba(255, 255, 255,0.8)"}},A);else{let Q=x+"Text";this.map.addLayer({id:Q,type:"symbol",source:U,layout:{"text-letter-spacing":.1,"text-size":{base:1.2,stops:[[8,0],[12,14],[15,15]]},"text-font":["FiraSans-Regular"],"text-field":["get","NOM_AC"],"text-transform":"none","text-max-width":25,visibility:o,"text-justify":"right","text-anchor":"top","text-allow-overlap":!1,"symbol-spacing":2,"text-line-height":1},paint:{"text-halo-blur":.5,"text-color":"rgba(90, 7, 7, 1)","text-halo-width":2,"text-halo-color":"rgba(255, 255, 255,0.8)"}},A)}}else f=await(await fetch(e)).json();if(n!=="all"){const v=document.createElement("div");v.id="titleDivMenu",v.textContent=t,a.appendChild(v);const x=document.createElement("div");x.id="titleDivMenuSub",x.textContent=`📂 ${n}`,a.appendChild(x)}let m=f.features[0].geometry.type;if(n==="all")m.includes("ine")&&(s!==void 0?this.map.addLayer({id:t,type:"line",source:{type:"geojson",data:f},layout:{visibility:"visible"},paint:s},A):this.map.addLayer({id:t,type:"line",source:{type:"geojson",data:f},layout:{visibility:"visible"},paint:{"line-color":"black","line-width":2,"line-opacity":1}},A)),m.includes("olygon")&&(s!==void 0?this.map.addLayer({id:t,type:"fill",source:{type:"geojson",data:f},layout:{visibility:"visible"},paint:s},A):this.map.addLayer({id:t,type:"fill",source:{type:"geojson",data:f},layout:{visibility:"visible"},paint:{"fill-color":"#0000FF","fill-opacity":0}},A)),m.includes("oint")&&(s!==void 0?this.map.addLayer({id:t,type:"circle",source:{type:"geojson",data:f},layout:{visibility:"visible"},paint:s},A):this.map.addLayer({id:t,type:"circle",source:{type:"geojson",data:f},layout:{visibility:"visible"},paint:{"circle-color":"red","circle-opacity":.85}},A)),this.addMenuItem(t);else{let v=n;const x={};f.features.forEach(C=>{const M=C.properties[v],U=M+"-userFieldFilter-"+t;M!==null&&(x[U]||(m.includes("ine")&&(s!==void 0?this.map.addLayer({id:U,type:"line",source:{type:"geojson",data:f},layout:{visibility:"visible"},filter:["==",`${v}`,M],paint:s},A):this.map.addLayer({id:U,type:"line",source:{type:"geojson",data:f},layout:{visibility:"visible"},filter:["==",`${v}`,M],paint:{"line-color":"black","line-width":2,"line-opacity":1}},A)),m.includes("olygon")&&(s!==void 0?this.map.addLayer({id:U,type:"fill",source:{type:"geojson",data:f},layout:{visibility:"visible"},filter:["==",`${v}`,M],paint:s},A):this.map.addLayer({id:U,type:"fill",source:{type:"geojson",data:f},layout:{visibility:"visible"},filter:["==",`${v}`,M],paint:{"fill-color":"blue","fill-opacity":.6}},A)),m.includes("oint")&&(s!==void 0?this.map.addLayer({id:U,type:"circle",source:{type:"geojson",data:f},layout:{visibility:"visible"},filter:["==",`${v}`,M],paint:s},A):this.map.addLayer({id:U,type:"circle",source:{type:"geojson",data:f},layout:{visibility:"visible"},filter:["==",`${v}`,M],paint:{"circle-color":"red","circle-opacity":.85}},A)),x[U]=!0,this.addMenuItem(U)))})}}catch(a){console.error(`Error fetching data: ${a.message}`)}}on(e,t){setTimeout(()=>{try{this.map.on(e,t)}catch(n){console.error(`Error adding event ON listener: ${n.message}`)}},500)}getSource(e){try{return this.map.getSource(e)}catch(t){console.error(`Error getting source: ${t.message}`)}}addSource(e,t){try{this.map.addSource(e,t)}catch(n){console.error(`Error adding source: ${n.message}`)}}setStyle(e,t){try{t!==void 0?this.map.setStyle(e,t):this.map.setStyle(e),this.map.on("styledata",()=>{if(window.document.querySelector(".maplibregl-compact-show")){var n=window.document.querySelector(".maplibregl-compact-show");n.classList.remove("maplibregl-compact-show")}this._dealOrto3dStyle(this.map.getStyle().name)})}catch(n){console.error(`Error setting style: ${n.message}`)}}getLayer(e){try{return this.map.getLayer(e)}catch(t){console.error(`Error getting layer: ${t.message}`)}}setFilter(e,t,n){try{return this.map.setFilter(e,t,n)}catch(i){console.error(`Error setting filter: ${i.message}`)}}jumpTo(e){try{this.map.jumpTo(e)}catch(t){console.error(`Error jumping to ${e}: ${t.message}`)}}setLayoutProperty(e,t,n){try{this.map.setLayoutProperty(e,t,n)}catch(i){console.error(`Error setting layout property: ${i.message}`)}}setPaintProperty(e,t,n){try{this.map.setPaintProperty(e,t,n)}catch(i){console.error(`Error setting paint property: ${i.message}`)}}addControl(e,t){try{t===void 0&&(t="top-right"),this.map.addControl(e,t)}catch(n){console.error(`Error adding control: ${n.message}`)}}getZoom(){try{return this.map.getZoom()}catch(e){console.error(`Error getting zoom level: ${e.message}`)}}addMouseCoordControl(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"bottom-left";try{this.map.addControl(new Vre(e),t)}catch(n){console.error(`Error adding mouse coordinate control: ${n.message}`)}}addGeolocateControl(e,t){try{t===void 0&&(t="top-right"),e===void 0?this.map.addControl(new Ts.GeolocateControl({positionOptions:{enableHighAccuracy:!0},trackUserLocation:!0}),t):this.map.addControl(new Ts.GeolocateControl(e),t)}catch(n){console.error(`Error adding geolocate control: ${n.message}`)}}addFullscreenControl(e,t){try{t===void 0&&(t="top-right"),e===void 0?this.map.addControl(new Ts.FullscreenControl({container:HTMLElement}),t):this.map.addControl(new Ts.FullscreenControl(e),t)}catch(n){console.error(`Error adding fullscreen control: ${n.message}`)}}getBounds(){try{return this.map.getBounds()}catch(e){console.error(`Error getting bounds: ${e.message}`)}}getCenter(){try{return this.map.getCenter()}catch(e){console.error(`Error getting center: ${e.message}`)}}setTerrain(e){try{return this.map.setTerrain(e)}catch(t){console.error(`Error setting terrain: ${t.message}`)}}setLayerZoomRange(e,t,n){try{return this.map.setLayerZoomRange(e,t,n)}catch(i){console.error(`Error setting terrain: ${i.message}`)}}getCanvas(){try{return this.map.getCanvas()}catch(e){console.error(`Error getting canvas: ${e.message}`)}}setCenter(e){try{return this.map.setCenter(e)}catch(t){console.error(`Error setting center: ${t.message}`)}}addLayer(e,t){try{this.map.addLayer(e,t)}catch(n){console.error(`Error adding layer: ${n.message}`)}}addLayerGeoJSON(e,t){try{let n="";t==="labels"&&(n=this._firstSymbolLayer()),t==="lines"&&(n=this._firstLineLayer()),this.map.addSource(`${e.id}`,{type:"geojson",data:e.data}),this.map.addLayer({id:`${e.id}-layerIcgcMap`,type:e.layerType,source:`${e.id}`,layout:e.layout,paint:e.paint},n)}catch(n){console.error(`Error adding GeoJSON layer: ${n.message}`)}}addLayerWMS(e,t){try{let n="";t==="labels"&&(n=this._firstSymbolLayer()),t==="lines"&&(n=this._firstLineLayer()),this.map.addSource(`${e.id}`,{type:"raster",tiles:[e.tiles],tileSize:256},n),this.map.addLayer({id:`${e.id}-layerIcgcMap`,type:"raster",source:`${e.id}`,paint:{}},n)}catch(n){console.error(`Error adding WMS layer: ${n.message}`)}}removeControl(e){try{this.map.removeControl(e)}catch(t){console.error(`Error removing control: ${t.message}`)}}removeLayer(e){try{this.map.removeLayer(e)}catch(t){console.error(`Error removing layer: ${t.message}`)}}removeSource(e){try{this.map.removeSource(e)}catch(t){console.error(`Error removing source: ${t.message}`)}}addLogo(e,t){try{const n=document.createElement("img");n.src=e.url,n.style.height=e.height;const i=document.getElementById("logos"),s=document.createElement("a");s.id=e.id,s.href=e.href,s.target="_blank",s.style.position="relative",s.style.bottom="1px",s.appendChild(n),i.appendChild(s)}catch(n){console.error(`Error adding logo: ${n.message}`)}}addBasemapsICGC(e){try{const t=i=>{map.setStyle(i)},n=document.getElementById("basemap-group");for(const i of e)for(const s of Object.keys(Hn.baseStyles)){const a=Hn.baseStyles[s];if(i===a.url){const o=document.createElement("div");o.className="basemap-item",o.title=a.key,o.style.backgroundImage=`url('${a.image}')`,n.appendChild(o),o.addEventListener("click",()=>t(a.url))}}}catch(t){console.error(`Error adding basemaps: ${t.message}`)}}addBasemaps(e){try{const t=i=>{map.setStyle(i.url)},n=document.getElementById("basemap-group");e.forEach(i=>{const s=document.createElement("div");s.className="basemap-item",s.title=i.label,s.style.backgroundImage=`url('${i.image}')`,n.appendChild(s),s.addEventListener("click",()=>t(i))})}catch(t){console.error(`Error adding basemaps: ${t.message}`)}}addFeatureQuery(e,t,n){try{let i;this.map.on("mouseenter",e,()=>{this.map.getCanvas().style.cursor="pointer"}),this.map.on("mouseleave",e,()=>{this.map.getCanvas().style.cursor=""}),this.map.on("click",s=>{let a=this.map.queryRenderedFeatures(s.point);if(a&&a[0].source.includes(e)){let o=[s.lngLat.lng,s.lngLat.lat];if(t!==void 0&&t.length>0&&t!=="all"){if(t!==null){let A="";t.forEach(f=>{let m=a[0].properties[f];A=A+`<h4>${m}</h4>`}),i=A,map.addPopup(o,i,n)}}else{let A="";for(const f in a[0].properties)A+="<b>"+f+"</b>:"+a[0].properties[f]+"<br>";i=A,map.addPopup(o,i,n)}}})}catch(i){console.error(`Error adding feature query: ${i.message}`)}}addScaleControl(e,t){try{var n=new Ts.ScaleControl(e);this.map.addControl(n,t)}catch(i){console.error(`Error adding scale: ${i.message}`)}}addExportControl(e,t){try{typeof e=="string"&&(t=e,e=void 0),e===void 0&&(e={PageSize:Hh.A4,PageOrientation:Bg.Landscape,Format:Ru.PNG,DPI:t2[300],Crosshair:!0,PrintableArea:!0},t="top-right"),this.map.addControl(new Xte(e),t)}catch(n){console.error(`Error adding export control: ${n.message}`)}}addPopup(e,t){try{new Ts.Popup().setLngLat(e).setHTML(t).addTo(this.map)}catch{}}addMarker(e){try{let t,n;return e.text===void 0?t=new Ts.Marker(e.options).setLngLat(e.coord).addTo(this.map):(n=new Ts.Popup({offset:e.textOffset}).setText(e.text),t=new Ts.Marker().setLngLat(e.coord).setPopup(n).addTo(this.map)),t}catch(t){return console.error(`Error adding marker: ${t.message}`),null}}addPopup(e,t,n){try{return n.image===void 0?new Ts.Popup().setLngLat(e).setHTML(`
|
|
2578
2578
|
<div class="popupBody">
|
|
2579
2579
|
<div class="popupTop">
|
|
2580
2580
|
${n.title}
|