mapicgc-gl-js 1.0.6 → 1.0.7
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/README.md +1 -1
- package/dist/mapicgc-gl.js +2 -2
- package/dist/mapicgc-gl.mjs +27 -40
- package/nodeSetConfig.js +6 -6
- package/package.json +2 -1
- package/src/config-out.js +7 -7
- package/src/config.js +1068 -825
- package/src/configNode.js +1027 -18
- package/src/constants/Layers.js +31 -1
- package/src/constants/Styles.js +6 -6
- package/src/map/Map.js +81 -25
- package/src/mapicgc-config.json +8 -1058
- package/test/exemples/addBasemap.html +2 -2
- package/test/exemples/addICGCTerrain.html +1 -1
package/dist/mapicgc-gl.js
CHANGED
|
@@ -5798,7 +5798,7 @@ end`};t.events.push([`putFont`,function(t){(function(t){var n=t.font,i=t.out,a=t
|
|
|
5798
5798
|
<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;"
|
|
5799
5799
|
xlink:href="${n}" width="${r}" height="${i}"></image>
|
|
5800
5800
|
</svg>`,o=document.createElement(`a`);o.href=`data:application/xml,${encodeURIComponent(a)}`,o.download=t,o.click(),o.remove()}toPixels(e,t=96){return this.unit===zX.mm&&(t/=25.4),`${t*e}px`}addLoader(){let e=this.map.getCanvas().parentElement?.parentElement;if(!e||e.getElementsByClassName(`map-export-loader`).length>0)return;let t=document.createElement(`span`);t.classList.add(`map-export-loader`),t.classList.add(`loader-default`),e.appendChild(t)}showLoader(){let e=this.map.getCanvas().parentElement?.parentElement;if(!e)return;let t=e.getElementsByClassName(`map-export-loader`);t&&t.length>0&&t.item(0)?.classList.add(`is-active`)}hideLoader(){let e=this.map.getCanvas().parentElement?.parentElement;if(!e)return;let t=e.getElementsByClassName(`map-export-loader`);t&&t.length>0&&t.item(0)?.classList.remove(`is-active`)}},t8=class extends e8{constructor(e,t=RX.A4,n=300,r=IX.PNG,i=zX.mm,a=`map`,o=Z6,s=Q6,c=$6){super(e,t,n,r,i,a,`maplibregl-marker`,o,`maplibregl-ctrl-attrib-inner`,s,c)}getRenderedMap(e,t){let n=new f.Map({container:e,style:t,center:this.map.getCenter(),zoom:this.map.getZoom(),bearing:this.map.getBearing(),pitch:this.map.getPitch(),interactive:!1,canvasContextAttributes:{preserveDrawingBuffer:!0},fadeDuration:0,transformRequest:this.map._requestManager._transformRequestFn});this.map.getTerrain()&&(n.setMaxPitch(85),n.setPitch(this.map.getPitch()));let r=(this.map.style.imageManager||{}).images||[];return Object.keys(r).forEach(e=>{r[e].data&&n.addImage(e,r[e].data)}),n}renderMapPost(e){let t=this.map.getTerrain();return t&&e.setTerrain({source:t.source,exaggeration:t.exaggeration}),e}},n8=class{controlContainer;exportContainer;crosshair;printableArea;map;exportButton;options={PageSize:RX.A4,PageOrientation:LX.Landscape,Format:IX.PDF,DPI:FX[300],Crosshair:!1,PrintableArea:!1,Local:`en`,AllowedSizes:Object.keys(RX),Filename:`map`,markerCirclePaint:Z6,attributionOptions:Q6,northIconOptions:$6};MAPLIB_CSS_PREFIX=`maplibregl`;constructor(e){e&&(e.attributionOptions=Object.assign(Q6,e.attributionOptions),e.northIconOptions=Object.assign($6,e.northIconOptions),this.options=Object.assign(this.options,e)),this.onDocumentClick=this.onDocumentClick.bind(this)}getDefaultPosition(){return`top-right`}getTranslation(){return UX(this.options.Local??`en`)}onAdd(e){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);let t=document.createElement(`TABLE`);t.className=`print-table`;let n={};this.options.AllowedSizes?.forEach(e=>{RX[e]&&(n[e]=RX[e])});let r=this.createSelection(n,this.getTranslation().PageSize,`page-size`,this.options.PageSize,(e,t)=>JSON.stringify(e[t]));t.appendChild(r);let i=this.createSelection(LX,this.getTranslation().PageOrientation,`page-orientation`,this.options.PageOrientation,(e,t)=>e[t]);t.appendChild(i);let a=this.createSelection(IX,this.getTranslation().Format,`format-type`,this.options.Format,(e,t)=>e[t]);t.appendChild(a);let o=this.createSelection(FX,this.getTranslation().DPI,`dpi-type`,this.options.DPI,(e,t)=>e[t]);t.appendChild(o),this.exportContainer.appendChild(t);let s=document.createElement(`button`);return s.type=`button`,s.textContent=this.getTranslation().Generate,s.classList.add(`generate-button`),s.addEventListener(`click`,()=>{let t=document.getElementById(`mapbox-gl-export-page-size`),n=document.getElementById(`mapbox-gl-export-page-orientation`),r=document.getElementById(`mapbox-gl-export-format-type`),i=document.getElementById(`mapbox-gl-export-dpi-type`),a=n.value,o=JSON.parse(t.value);a===LX.Portrait&&(o=o.reverse()),this.generateMap(e,o,Number(i.value),r.value,zX.mm,this.options.Filename)}),this.exportContainer.appendChild(s),this.controlContainer}generateMap(e,t,n,r,i,a){new t8(e,t,n,r,i,a,this.options.markerCirclePaint,this.options.attributionOptions,this.options.northIconOptions).generate()}createSelection(e,t,n,r,i){let a=document.createElement(`label`);a.textContent=t;let o=document.createElement(`select`);o.setAttribute(`id`,`mapbox-gl-export-${n}`),o.style.width=`100%`,Object.keys(e).forEach(t=>{let a=document.createElement(`option`);a.setAttribute(`value`,i(e,t)),a.appendChild(document.createTextNode(t)),a.setAttribute(`name`,n),r===e[t]&&(a.selected=!0),o.appendChild(a)}),o.addEventListener(`change`,()=>{this.updatePrintableArea()});let s=document.createElement(`TR`),c=document.createElement(`TD`),l=document.createElement(`TD`);return c.appendChild(a),l.appendChild(o),s.appendChild(c),s.appendChild(l),s}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 PX(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 BX(this.map),this.updatePrintableArea()))}updatePrintableArea(){if(this.printableArea===void 0)return;let e=document.getElementById(`mapbox-gl-export-page-size`),t=document.getElementById(`mapbox-gl-export-page-orientation`).value,n=JSON.parse(e.value);t===LX.Portrait&&(n=n.reverse()),this.printableArea.updateArea(n[0],n[1])}};function r8(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})}var i8=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{};function a8(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}var o8,s8;function c8(){if(s8)return o8;s8=1,o8=t;var e=Object.prototype.hasOwnProperty;function t(){for(var t={},n=0;n<arguments.length;n++){var r=arguments[n];for(var i in r)e.call(r,i)&&(t[i]=r[i])}return t}return o8}var l8={exports:{}},u8;function d8(){return u8?l8.exports:(u8=1,(function(e,t){(function(){var t={};e.exports=t,t.simpleFilter=function(e,n){return n.filter(function(n){return t.test(e,n)})},t.test=function(e,n){return t.match(e,n)!==null},t.match=function(e,t,n){n||={};var r=0,i=[],a=t.length,o=0,s=0,c=n.pre||``,l=n.post||``,u=n.caseSensitive&&t||t.toLowerCase(),d;e=n.caseSensitive&&e||e.toLowerCase();for(var f=0;f<a;f++)d=t[f],u[f]===e[r]?(d=c+d+l,r+=1,s+=1+s):s=0,o+=s,i[i.length]=d;return r===e.length?(o=u===e?1/0:o,{rendered:i.join(``),score:o}):null},t.filter=function(e,n,r){return!n||n.length===0?[]:typeof e==`string`?(r||={},n.reduce(function(n,i,a,o){var s=i;r.extract&&(s=r.extract(i));var c=t.match(e,s,r);return c!=null&&(n[n.length]={string:c.rendered,score:c.score,index:a,original:i}),n},[]).sort(function(e,t){return t.score-e.score||e.index-t.index})):n}})()})(l8),l8.exports)}var f8,p8;function m8(){if(p8)return f8;p8=1;var e=function(e){return this.component=e,this.items=[],this.active=e.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,e.el.parentNode.insertBefore(this.wrapper,e.el.nextSibling),this};return e.prototype.show=function(){this.element.style.display=`block`},e.prototype.hide=function(){this.element.style.display=`none`},e.prototype.add=function(e){this.items.push(e)},e.prototype.clear=function(){this.items=[],this.active=this.component.options.noInitialSelection?-1:0},e.prototype.isEmpty=function(){return!this.items.length},e.prototype.isVisible=function(){return this.element.style.display===`block`},e.prototype.draw=function(){if(this.element.innerHTML=``,this.items.length===0){this.hide();return}for(var e=0;e<this.items.length;e++)this.drawItem(this.items[e],this.active===e);this.show()},e.prototype.drawItem=function(e,t){var n=document.createElement(`li`),r=document.createElement(`a`);t&&(n.className+=` active`),r.innerHTML=e.string,n.appendChild(r),this.element.appendChild(n),n.addEventListener(`mousedown`,function(){this.selectingListItem=!0}.bind(this)),n.addEventListener(`mouseup`,function(){this.handleMouseUp.call(this,e)}.bind(this))},e.prototype.handleMouseUp=function(e){this.selectingListItem=!1,this.component.value(e.original),this.clear(),this.draw()},e.prototype.move=function(e){this.active=e,this.draw()},e.prototype.previous=function(){this.move(this.active<=0?this.items.length-1:this.active-1)},e.prototype.next=function(){this.move(this.active>=this.items.length-1?0:this.active+1)},e.prototype.drawError=function(e){var t=document.createElement(`li`);t.innerHTML=e,this.element.appendChild(t),this.show()},f8=e,f8}var h8,g8;function _8(){if(g8)return h8;g8=1;var e=c8(),t=d8(),n=m8(),r=function(t,r,i){return i||={},this.options=e({minLength:2,limit:5,filter:!0,hideOnBlur:!0,noInitialSelection:!0},i),this.el=t,this.data=r||[],this.list=new n(this),this.query=``,this.selected=null,this.list.draw(),this.el.addEventListener(`keyup`,function(e){this.handleKeyUp(e.keyCode,e)}.bind(this),!1),this.el.addEventListener(`keydown`,function(e){this.handleKeyDown(e)}.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(e){this.handlePaste(e)}.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};return r.prototype.handleKeyUp=function(e,t){if(!(e===40||e===38||e===27||e===9)){if(e===13){this.list.items[this.list.active]&&(this.list.handleMouseUp(this.list.items[this.list.active]),t.stopPropagation());return}this.handleInputChange(this.el.value)}},r.prototype.handleKeyDown=function(e){switch(e.keyCode){case 13:this.list.active>=0&&(this.list.selectingListItem=!0);break;case 9:this.list.isEmpty()||(this.list.isVisible()&&e.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}},r.prototype.handleBlur=function(){!this.list.selectingListItem&&this.options.hideOnBlur&&this.list.hide()},r.prototype.handlePaste=function(e){if(e.clipboardData)this.handleInputChange(e.clipboardData.getData(`Text`));else{var t=this;setTimeout(function(){t.handleInputChange(e.target.value)},100)}},r.prototype.handleInputChange=function(e){if(this.query=this.normalize(e),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))},r.prototype.handleFocus=function(){this.list.isEmpty()||this.list.show(),this.list.selectingListItem=!1},r.prototype.update=function(e){this.data=e,this.handleKeyUp()},r.prototype.clear=function(){this.data=[],this.list.clear()},r.prototype.normalize=function(e){return e=e.toLowerCase(),e},r.prototype.match=function(e,t){return e.indexOf(t)>-1},r.prototype.value=function(e){if(this.selected=e,this.el.value=this.getItemValue(e||{place_name:this.query}),document.createEvent){var t=document.createEvent(`HTMLEvents`);t.initEvent(`change`,!0,!1),this.el.dispatchEvent(t)}else this.el.fireEvent(`onchange`)},r.prototype.getCandidates=function(e){var n={pre:`<strong>`,post:`</strong>`,extract:function(e){return this.getItemValue(e)}.bind(this)},r;this.options.filter?(r=t.filter(this.query,this.data,n),r=r.map(function(e){return{original:e.original,string:this.render(e.original,e.string)}}.bind(this))):r=this.data.map(function(e){return{original:e,string:this.render(e)}}.bind(this)),e(r)},r.prototype.getItemValue=function(e){return e},r.prototype.render=function(e,t){if(t)return t;for(var n=e.original?this.getItemValue(e.original):this.getItemValue(e),r=this.normalize(n),i=r.lastIndexOf(this.query);i>-1;){var a=i+this.query.length;n=n.slice(0,i)+`<strong>`+n.slice(i,a)+`</strong>`+n.slice(a),i=r.slice(0,i).lastIndexOf(this.query)}return n},r.prototype.renderError=function(e){this.list.drawError(e)},h8=r,h8}var v8,y8;function b8(){if(y8)return v8;y8=1;var e=_8();return v8=e,typeof window<`u`&&(window.Suggestions=e),v8}var x8=a8(b8()),S8={exports:{}},C8=S8.exports,w8;function T8(){return w8?S8.exports:(w8=1,(function(e){(function(t,n,r){e.exports?e.exports=r():t[n]=r()})(C8,`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(e){return e.match(t)||[]}function r(e){return n(e).filter(function(e,t){return e&&t})}function i(t){return t=n(t),{language:t[1]||e,extlang:t[2]||e,script:t[3]||e,region:t[4]||e}}function a(e,t,n){Object.defineProperty(e,t,{value:n,enumerable:!0})}function o(t,r,o){function s(r){return n(r)[t]||e}a(s,`pattern`,r),a(i,o,s)}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(i,`split`,r),i})})(S8),S8.exports)}var E8=a8(T8()),D8,O8;function k8(){if(O8)return D8;O8=1;var e=`Expected a function`,t=NaN,n=`[object Symbol]`,r=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,o=/^0o[0-7]+$/i,s=parseInt,c=typeof i8==`object`&&i8&&i8.Object===Object&&i8,l=typeof self==`object`&&self&&self.Object===Object&&self,u=c||l||Function(`return this`)(),d=Object.prototype.toString,f=Math.max,p=Math.min,m=function(){return u.Date.now()};function h(t,n,r){var i,a,o,s,c,l,u=0,d=!1,h=!1,_=!0;if(typeof t!=`function`)throw TypeError(e);n=y(n)||0,g(r)&&(d=!!r.leading,h=`maxWait`in r,o=h?f(y(r.maxWait)||0,n):o,_=`trailing`in r?!!r.trailing:_);function v(e){var n=i,r=a;return i=a=void 0,u=e,s=t.apply(r,n),s}function b(e){return u=e,c=setTimeout(C,n),d?v(e):s}function x(e){var t=e-l,r=e-u,i=n-t;return h?p(i,o-r):i}function S(e){var t=e-l,r=e-u;return l===void 0||t>=n||t<0||h&&r>=o}function C(){var e=m();if(S(e))return w(e);c=setTimeout(C,x(e))}function w(e){return c=void 0,_&&i?v(e):(i=a=void 0,s)}function T(){c!==void 0&&clearTimeout(c),u=0,i=l=a=c=void 0}function E(){return c===void 0?s:w(m())}function D(){var e=m(),t=S(e);if(i=arguments,a=this,l=e,t){if(c===void 0)return b(l);if(h)return c=setTimeout(C,n),v(l)}return c===void 0&&(c=setTimeout(C,n)),s}return D.cancel=T,D.flush=E,D}function g(e){var t=typeof e;return!!e&&(t==`object`||t==`function`)}function _(e){return!!e&&typeof e==`object`}function v(e){return typeof e==`symbol`||_(e)&&d.call(e)==n}function y(e){if(typeof e==`number`)return e;if(v(e))return t;if(g(e)){var n=typeof e.valueOf==`function`?e.valueOf():e;e=g(n)?n+``:n}if(typeof e!=`string`)return e===0?e:+e;e=e.replace(r,``);var c=a.test(e);return c||o.test(e)?s(e.slice(2),c?2:8):i.test(e)?t:+e}return D8=h,D8}var A8=a8(k8()),j8=a8(c8()),M8={exports:{}},N8;function P8(){if(N8)return M8.exports;N8=1;var e=typeof Reflect==`object`?Reflect:null,t=e&&typeof e.apply==`function`?e.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)},n=e&&typeof e.ownKeys==`function`?e.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};function r(e){console&&console.warn&&console.warn(e)}var i=Number.isNaN||function(e){return e!==e};function a(){a.init.call(this)}M8.exports=a,M8.exports.once=_,a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var o=10;function s(e){if(typeof e!=`function`)throw TypeError(`The "listener" argument must be of type Function. Received type `+typeof e)}Object.defineProperty(a,`defaultMaxListeners`,{enumerable:!0,get:function(){return o},set:function(e){if(typeof e!=`number`||e<0||i(e))throw RangeError(`The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received `+e+`.`);o=e}}),a.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},a.prototype.setMaxListeners=function(e){if(typeof e!=`number`||e<0||i(e))throw RangeError(`The value of "n" is out of range. It must be a non-negative number. Received `+e+`.`);return this._maxListeners=e,this};function c(e){return e._maxListeners===void 0?a.defaultMaxListeners:e._maxListeners}a.prototype.getMaxListeners=function(){return c(this)},a.prototype.emit=function(e){for(var n=[],r=1;r<arguments.length;r++)n.push(arguments[r]);var i=e===`error`,a=this._events;if(a!==void 0)i&&=a.error===void 0;else if(!i)return!1;if(i){var o;if(n.length>0&&(o=n[0]),o instanceof Error)throw o;var s=Error(`Unhandled error.`+(o?` (`+o.message+`)`:``));throw s.context=o,s}var c=a[e];if(c===void 0)return!1;if(typeof c==`function`)t(c,this,n);else for(var l=c.length,u=m(c,l),r=0;r<l;++r)t(u[r],this,n);return!0};function l(e,t,n,i){var a,o,l;if(s(n),o=e._events,o===void 0?(o=e._events=Object.create(null),e._eventsCount=0):(o.newListener!==void 0&&(e.emit(`newListener`,t,n.listener?n.listener:n),o=e._events),l=o[t]),l===void 0)l=o[t]=n,++e._eventsCount;else if(typeof l==`function`?l=o[t]=i?[n,l]:[l,n]:i?l.unshift(n):l.push(n),a=c(e),a>0&&l.length>a&&!l.warned){l.warned=!0;var u=Error(`Possible EventEmitter memory leak detected. `+l.length+` `+String(t)+` listeners added. Use emitter.setMaxListeners() to increase limit`);u.name=`MaxListenersExceededWarning`,u.emitter=e,u.type=t,u.count=l.length,r(u)}return e}a.prototype.addListener=function(e,t){return l(this,e,t,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(e,t){return l(this,e,t,!0)};function u(){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 d(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=u.bind(r);return i.listener=n,r.wrapFn=i,i}a.prototype.once=function(e,t){return s(t),this.on(e,d(this,e,t)),this},a.prototype.prependOnceListener=function(e,t){return s(t),this.prependListener(e,d(this,e,t)),this},a.prototype.removeListener=function(e,t){var n,r,i,a,o;if(s(t),r=this._events,r===void 0||(n=r[e],n===void 0))return this;if(n===t||n.listener===t)--this._eventsCount===0?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit(`removeListener`,e,n.listener||t));else if(typeof n!=`function`){for(i=-1,a=n.length-1;a>=0;a--)if(n[a]===t||n[a].listener===t){o=n[a].listener,i=a;break}if(i<0)return this;i===0?n.shift():h(n,i),n.length===1&&(r[e]=n[0]),r.removeListener!==void 0&&this.emit(`removeListener`,e,o||t)}return this},a.prototype.off=a.prototype.removeListener,a.prototype.removeAllListeners=function(e){var t,n=this._events,r;if(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 i=Object.keys(n),a;for(r=0;r<i.length;++r)a=i[r],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(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this};function f(e,t,n){var r=e._events;if(r===void 0)return[];var i=r[t];return i===void 0?[]:typeof i==`function`?n?[i.listener||i]:[i]:n?g(i):m(i,i.length)}a.prototype.listeners=function(e){return f(this,e,!0)},a.prototype.rawListeners=function(e){return f(this,e,!1)},a.listenerCount=function(e,t){return typeof e.listenerCount==`function`?e.listenerCount(t):p.call(e,t)},a.prototype.listenerCount=p;function p(e){var t=this._events;if(t!==void 0){var n=t[e];if(typeof n==`function`)return 1;if(n!==void 0)return n.length}return 0}a.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]};function m(e,t){for(var n=Array(t),r=0;r<t;++r)n[r]=e[r];return n}function h(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}function g(e){for(var t=Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}function _(e,t){return new Promise(function(n,r){function i(n){e.removeListener(t,a),r(n)}function a(){typeof e.removeListener==`function`&&e.removeListener(`error`,i),n([].slice.call(arguments))}y(e,t,a,{once:!0}),t!==`error`&&v(e,i,{once:!0})})}function v(e,t,n){typeof e.on==`function`&&y(e,`error`,t,n)}function y(e,t,n,r){if(typeof e.on==`function`)r.once?e.once(t,n):e.on(t,n);else if(typeof e.addEventListener==`function`)e.addEventListener(t,function i(a){r.once&&e.removeEventListener(t,i),n(a)});else throw TypeError(`The "emitter" argument must be of type EventEmitter. Received type `+typeof e)}return M8.exports}var F8=P8(),I8={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]]}},L8={placeholder:{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:`Поиск`,es:`Buscar`},errorNoResults:{en:`No results found`,de:`Keine Ergebnisse gefunden`,es:`No hay resultados`,fr:`Aucun résultat trouvé`},errorConnectionFailed:{en:`There was an error reaching the server`,de:`Verbindung fehlgeschlagen`,es:`Error al conectarse al servidor`,fr:`Une erreur est survenue lors de la connexion au serveur`}},R8=/(-?\d+\.?\d*)[, ]+(-?\d+\.?\d*)[ ]*$/,z8=class{constructor(e,t,n=(e,t,n)=>new x8(e,t,n)){this.options={zoom:16,flyTo:!0,trackProximity:!0,showResultsWhileTyping:!1,minLength:2,reverseGeocode:!1,limit:5,enableEventLogging:!0,marker:!0,popup:!1,maplibregl:void 0,collapsed:!1,clearAndBlurOnEsc:!1,clearOnBlur:!1,proximityMinZoom:9,getItemValue:e=>e.text==null?e.place_name:e.text,render:e=>{if(!(`geometry`in e)){let t=e.text,n=t.toLowerCase().indexOf(this._typeahead.query.toLowerCase()),r=this._typeahead.query.length,i=t.substring(0,n),a=t.substring(n,n+r),o=t.substring(n+r);return`<div class="maplibregl-ctrl-geocoder--suggestion"><svg class="maplibregl-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="maplibregl-ctrl-geocoder--suggestion-info"><div class="maplibregl-ctrl-geocoder--suggestion-title">`+i+`<span class="maplibregl-ctrl-geocoder--suggestion-match">`+a+`</span>`+o+`</div></div></div>`}let t=e.place_name.split(`,`);return`<div class="maplibregl-ctrl-geocoder--result"><svg class="maplibregl-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="maplibregl-ctrl-geocoder--result-title">`+t[0]+`</div><div class="maplibregl-ctrl-geocoder--result-address">`+t.splice(1,t.length).join(`,`)+`</div></div></div>`},popupRender:e=>{let t=e.place_name.split(`,`);return`<div class="maplibregl-ctrl-geocoder--suggestion popup-suggestion"><div class="maplibregl-ctrl-geocoder--suggestion-title popup-suggestion-title">`+t[0]+`</div><div class="maplibregl-ctrl-geocoder--suggestion-address popup-suggestion-address">`+t.splice(1,t.length).join(`,`)+`</div></div>`},showResultMarkers:!0,debounceSearch:200},this._eventEmitter=new F8.EventEmitter,this.options=j8({},this.options,t),this.fresh=!0,this.lastSelected=null,this.geocoderApi=e,this.typeaheadFactory=n}addTo(e){function t(e,t){if(!document.body.contains(t))throw Error(`Element provided to #addTo() exists, but is not in the DOM`);let n=e.onAdd();t.appendChild(n)}if(e instanceof HTMLElement)t(this,e);else if(typeof e==`string`){let n=document.querySelectorAll(e);if(n.length===0)throw Error(`Element `+e+`not found.`);if(n.length>1)throw Error(`Geocoder can only be added to a single html element`);t(this,n[0])}else if(`addControl`in e)e.addControl(this);else throw Error(`Error: addTo must be a maplibre-gl-js map, an html element, or a CSS selector query for a single html element`)}onAdd(e){if(e&&typeof e!=`string`&&(this._map=e),this.setLanguage(),this.options.localGeocoderOnly&&!this.options.localGeocoder)throw 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);let t=this.container=document.createElement(`div`);t.className=`maplibregl-ctrl-geocoder maplibregl-ctrl maplibregl-ctrl-geocoder maplibregl-ctrl`;let n=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=`search`,this._inputEl.className=`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`,A8(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);let r=document.createElement(`div`);r.classList.add(`maplibregl-ctrl-geocoder--pin-right`),this._clearEl=document.createElement(`button`),this._clearEl.setAttribute(`type`,`button`),this._clearEl.setAttribute(`aria-label`,`Clear`),this._clearEl.addEventListener(`click`,this.clear),this._clearEl.className=`maplibregl-ctrl-geocoder--button`;let 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"/>`),r.appendChild(this._clearEl),r.appendChild(this._loadingEl),t.appendChild(n),t.appendChild(this._inputEl),t.appendChild(r),this._typeahead=this.typeaheadFactory(this._inputEl,[],{filter:!1,minLength:this.options.minLength,limit:this.options.limit,noInitialSelection:!0}),this.container.addEventListener(`click`,()=>{this._typeahead.update(this._typeahead.data)}),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)),t}createIcon(e,t){let n=document.createElementNS(`http://www.w3.org/2000/svg`,`svg`);if(n.setAttribute(`class`,`maplibregl-ctrl-geocoder--icon maplibregl-ctrl-geocoder--icon-`+e),n.setAttribute(`viewBox`,`0 0 18 18`),n.setAttribute(`xml:space`,`preserve`),n.setAttribute(`width`,`18`),n.setAttribute(`height`,`18`),`innerHTML`in n)n.innerHTML=t;else{let e=document.createElement(`div`);e.innerHTML=`<svg>`+t.valueOf().toString()+`</svg>`;let r=e.firstChild.firstChild;n.appendChild(r)}return n}onRemove(){return this.container.remove(),this.options.trackProximity&&this._map&&this._map.off(`moveend`,this._updateProximity),this._removeMarker(),this._map=null,this}_onPaste(e){let t=(e.clipboardData||window.clipboardData).getData(`text`);t.length>=this.options.minLength&&this.options.showResultsWhileTyping&&this._geocode(t)}_onKeyDown(e){if(e.key===`Escape`&&this.options.clearAndBlurOnEsc){this._clear(e),this._inputEl.blur();return}let t=this._inputEl.value;if(!t){this.fresh=!0,e.key!==`Tab`&&this.clear(e),this._clearEl.style.display=`none`;return}if(!(e.metaKey||e.key===`Tab`||e.key===`Escape`||e.key===`ArrowLeft`||e.key===`ArrowRight`||e.key===`ArrowUp`||e.key===`ArrowDown`)){if(e.key===`Enter`)if(!this.options.showResultsWhileTyping)this._typeahead.selected||this._geocode(t);else{this._typeahead.selected==null&&this.geocoderApi.getSuggestions?this._geocode(t,!0):this._typeahead.selected==null&&this.options.showResultMarkers&&this._fitBoundsForMarkers();return}t.length>=this.options.minLength&&this.options.showResultsWhileTyping&&this._geocode(t)}}_showButton(){this._inputEl.value.length>0&&(this._clearEl.style.display=`block`)}_hideButton(){this._typeahead.selected&&(this._clearEl.style.display=`none`)}_onBlur(e){this.options.clearOnBlur&&this._clearOnBlur(e),this.options.collapsed&&this._collapse()}_onChange(){let e=this._typeahead.selected;if(e){if(!(`geometry`in e)){e.placeId?this._geocode(e.placeId,!0,!0):this._geocode(e.text,!0);return}if(JSON.stringify(e)!==this.lastSelected){if(this._clearEl.style.display=`none`,this.options.flyTo){let t;if(this._removeResultMarkers(),e.properties&&I8[e.properties.short_code])t=j8({},this.options.flyTo),this._map&&this._map.fitBounds(I8[e.properties.short_code].bbox,t);else if(e.bbox){let n=e.bbox;t=j8({},this.options.flyTo),this._map&&this._map.fitBounds([[n[0],n[1]],[n[2],n[3]]],t)}else t=j8({},{zoom:this.options.zoom},this.options.flyTo),e.center?t.center=e.center:e.geometry?.type===`Point`&&e.geometry.coordinates&&(t.center=e.geometry.coordinates),this._map&&this._map.flyTo(t)}this.options.marker&&this._maplibregl&&this._handleMarker(e),this._inputEl.focus(),this._inputEl.scrollLeft=0,this._inputEl.setSelectionRange(0,0),this.lastSelected=JSON.stringify(e),this._typeahead.selected=null,this._eventEmitter.emit(`result`,{result:e})}}}_getConfigForRequest(){return[`bbox`,`limit`,`proximity`,`countries`,`types`,`language`,`reverseMode`].reduce((e,t)=>(this.options[t]&&([`countries`,`types`,`language`].indexOf(t)>-1?e[t]=this.options[t].split(/[\s,]+/):e[t]=this.options[t],t===`proximity`&&this.options[t]&&typeof this.options[t].longitude==`number`&&typeof this.options[t].latitude==`number`&&(e[t]=[this.options[t].longitude,this.options[t].latitude])),e),{})}_geocode(e){return r8(this,arguments,void 0,function*(e,t=!1,n=!1){this._loadingEl.style.display=`block`,this._eventEmitter.emit(`loading`,{query:e});let r=this._getConfigForRequest(),i=this._createGeocodeRequest(r,e,t,n),a=this.options.localGeocoder&&this.options.localGeocoder(e)||[];try{let n=yield i;yield this._handleGeocodeResponse(n,r,e,t,a)}catch(e){this._handleGeocodeErrorResponse(e,a)}return i})}_createGeocodeRequest(e,t,n,r){return this.options.localGeocoderOnly?Promise.resolve({}):this.options.reverseGeocode&&R8.test(t)?this._createReverseGeocodeRequest(t,e):(e.query=t,this.geocoderApi.getSuggestions?n?this.geocoderApi.searchByPlaceId&&r?this.geocoderApi.searchByPlaceId(e):this.geocoderApi.forwardGeocode(e):this.geocoderApi.getSuggestions(e):this.geocoderApi.forwardGeocode(e))}_createReverseGeocodeRequest(e,t){return t.query=e.split(/[\s(,)?]+/).map(e=>parseFloat(e)).reverse(),t.limit=1,`proximity`in t&&delete t.proximity,this.geocoderApi.reverseGeocode(t)}_handleGeocodeResponse(e,t,n,r,i){return r8(this,void 0,void 0,function*(){this._loadingEl.style.display=`none`;let a={};a=e||{type:`FeatureCollection`,features:[]},a.config=t,this.fresh&&=!1,a.features=a.features?i.concat(a.features):i;let o=this.options.externalGeocoder&&this.options.externalGeocoder(n,a.features,t)||Promise.resolve([]);try{let e=yield o;a.features=a.features?e.concat(a.features):e}catch{}this.options.filter&&a.features.length&&(a.features=a.features.filter(this.options.filter));let s=[];s=`suggestions`in a?a.suggestions:`place`in a?Array.isArray(a.place)?a.place:[a.place]:a.features,s.length?(this._clearEl.style.display=`block`,this._typeahead.update(s),(!this.options.showResultsWhileTyping||r)&&this.options.showResultMarkers&&(a.features.length>0||`place`in a)&&this._fitBoundsForMarkers(),this._eventEmitter.emit(`results`,a)):(this._clearEl.style.display=`none`,this._typeahead.selected=null,this._renderNoResults(),this._eventEmitter.emit(`results`,a))})}_handleGeocodeErrorResponse(e,t){this._loadingEl.style.display=`none`,t.length&&this.options.localGeocoder?(this._clearEl.style.display=`block`,this._typeahead.update(t)):(this._clearEl.style.display=`none`,this._typeahead.selected=null,this._renderError()),this._eventEmitter.emit(`results`,{features:t}),this._eventEmitter.emit(`error`,{error:e})}_clear(e){e&&e.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(e){this._clear(e),this._inputEl.focus()}_clearOnBlur(e){e.relatedTarget&&this._clear(e)}_onQueryResult(e){if(!(`features`in e)||!e.features.length)return;let t=e.features[0];this._typeahead.selected=t,this._inputEl.value=t.place_name,this._onChange()}_updateProximity(){if(this._map)if(this._map.getZoom()>this.options.proximityMinZoom){let e=this._map.getCenter().wrap();this.setProximity({longitude:e.lng,latitude:e.lat})}else this.setProximity(null)}_collapse(){!this._inputEl.value&&this._inputEl!==document.activeElement&&this.container.classList.add(`maplibregl-ctrl-geocoder--collapsed`)}_unCollapse(){this.container.classList.remove(`maplibregl-ctrl-geocoder--collapsed`)}query(e){return r8(this,void 0,void 0,function*(){let t=yield this._geocode(e);this._onQueryResult(t)})}_renderError(){let e=`<div class='maplibre-gl-geocoder--error'>${this._localize(`errorConnectionFailed`)}</div>`;this._renderMessage(e)}_renderNoResults(){let e=`<div class='maplibre-gl-geocoder--error maplibre-gl-geocoder--no-results'>
|
|
5801
|
-
${this._localize(`errorNoResults`)}</div>`;this._renderMessage(e)}_renderMessage(e){this._typeahead.update([]),this._typeahead.selected=null,this._typeahead.clear(),this._typeahead.renderError(e)}_localize(e){let t=E8.language(this.options.language.split(`,`)[0]);return this.options.language&&L8?.[e][t]?L8[e][t]:L8[e].en}_fitBoundsForMarkers(){if(this._typeahead.data.length<1)return;let e=this._typeahead.data.filter(e=>typeof e!=`string`).slice(0,this.options.limit);if(this._clearEl.style.display=`none`,this.options.flyTo&&this._maplibregl&&this._map){let t=j8({},{padding:100},this.options.flyTo),n=new this._maplibregl.LngLatBounds;for(let t of e)`geometry`in t&&t.geometry?.type===`Point`&&n.extend(t.geometry.coordinates);this._map.fitBounds(n,t)}return e.length>0&&this._maplibregl&&this._handleResultMarkers(e),this}setInput(e){return this._inputEl.value=e,this._typeahead.selected=null,this._typeahead.clear(),e.length>=this.options.minLength&&this.options.showResultsWhileTyping&&this._geocode(e),this}setProximity(e){return this.options.proximity=e,this}getProximity(){return this.options.proximity}setRenderFunction(e){return e&&typeof e==`function`&&(this._typeahead.render=e),this}getRenderFunction(){return this._typeahead.render}setLanguage(e){return this.options.language=e||this.options.language||navigator.language,this}getLanguage(){return this.options.language}getZoom(){return this.options.zoom}setZoom(e){return this.options.zoom=e,this}getFlyTo(){return this.options.flyTo}setFlyTo(e){return this.options.flyTo=e,this}getPlaceholder(){return this.options.placeholder}setPlaceholder(e){return this.options.placeholder=e||this.options.placeholder||this._localize(`placeholder`),this._inputEl.placeholder=this.options.placeholder,this._inputEl.setAttribute(`aria-label`,this.options.placeholder),this}getBbox(){return this.options.bbox}setBbox(e){return this.options.bbox=e,this}getCountries(){return this.options.countries}setCountries(e){return this.options.countries=e,this}getTypes(){return this.options.types}setTypes(e){return this.options.types=e,this}getMinLength(){return this.options.minLength}setMinLength(e){return this.options.minLength=e,this._typeahead&&(this._typeahead.options.minLength=e),this}getLimit(){return this.options.limit}setLimit(e){return this.options.limit=e,this._typeahead&&(this._typeahead.options.limit=e),this}getFilter(){return this.options.filter}setFilter(e){return this.options.filter=e,this}setGeocoderApi(e){return this.geocoderApi=e,this}getGeocoderApi(){return this.geocoderApi}_handleMarker(e){if(!this._map)return;this._removeMarker();let t=j8({},{color:`#4668F2`},this.options.marker);this.mapMarker=new this._maplibregl.Marker(t);let n=null;if(this.options.popup){let t=j8({},{},this.options.popup);n=new this._maplibregl.Popup(t).setHTML(this.options.popupRender(e))}return e.center?(this.mapMarker.setLngLat(e.center).addTo(this._map),this.options.popup&&this.mapMarker.setPopup(n)):e.geometry?.type===`Point`&&e.geometry.coordinates&&(this.mapMarker.setLngLat(e.geometry.coordinates).addTo(this._map),this.options.popup&&this.mapMarker.setPopup(n)),this}_removeMarker(){this.mapMarker&&=(this.mapMarker.remove(),null)}_handleResultMarkers(e){if(!this._map)return;this._removeResultMarkers();let t=j8({},{color:`#4668F2`},this.options.showResultMarkers);for(let n of e){let e;if(this.options.showResultMarkers){this.options.showResultMarkers&&this.options.showResultMarkers.element&&(e=this.options.showResultMarkers.element.cloneNode(!0),t=j8(t,{element:e}));let r=new this._maplibregl.Marker(j8({},t,{element:e})),i;if(this.options.popup){let e=j8({},{},this.options.popup);i=new this._maplibregl.Popup(e).setHTML(this.options.popupRender(n))}n.center?(r.setLngLat(n.center).addTo(this._map),this.options.popup&&r.setPopup(i)):n.geometry&&n.geometry.type&&n.geometry.type===`Point`&&n.geometry.coordinates&&(r.setLngLat(n.geometry.coordinates).addTo(this._map),this.options.popup&&r.setPopup(i)),this.resultMarkers.push(r)}}return this}_removeResultMarkers(){this.resultMarkers&&this.resultMarkers.length>0&&(this.resultMarkers.forEach(function(e){e.remove()}),this.resultMarkers=[])}on(e,t){return this._eventEmitter.on(e,t),this}once(e){return new Promise(t=>{this._eventEmitter.once(e,t)})}off(e,t){return this._eventEmitter.removeListener(e,t),this}},B8={defaultOptions:JSON.parse(`{"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":false,"style":"https://geoserveis.icgc.cat/styles/icgc_mapa_base_gris.json.json","maxZoom":18,"maxPitch":85},"logoIcgcOptions":{"logoUrlColor":"https://eines.icgc.cat/recursos/logos/icgc_logo_color.png","logoUrlWhite":"https://eines.icgc.cat/recursos/logos/icgc_logo_blanc.svg","logoLink":"https://www.icgc.cat","logoTitle":"Institut Cartogràfic i Geològic de Catalunya","logoWidth":100,"logoOpacity":0.6},"logoGencatOptions":{"logoUrlColor":"https://eines.icgc.cat/recursos/logos/gencat_logo_color.png","logoUrlWhite":"https://eines.icgc.cat/recursos/logos/gencat_logo_blanc.png","logoLink":"https://web.gencat.cat/","logoTitle":"Generalitat de Catalunya","logoWidth":100,"logoOpacity":0.6},"map3dOptions":{"spaceErrorFactor":2,"exaggeration":1,"zfactor":48,"minZoomRange":15.5,"maxZoomRange":22,"urlTilesetCities":"https://geoserveis.icgc.cat/servei/catalunya/ciutats/3dtiles/v1/tilesetV1.0.json","layerIdOrder":"place-isolated","sourceLayerFilterId":"place","minZoomFilter":14,"layerId3d":"edificisMapboxLayer","terrainSource":"ICGC5M","style3dName":"orto3d","imageIcon":"https://eines.icgc.cat/recursos//images/stick.png"},"baseStyles":[{"key":"TOPO","url":"https://geoserveis.icgc.cat/styles/icgc_mapa_base_topografic.json","image":"https://visors.icgc.cat/contextmaps/imatges_estil/icgc_mapa_estandard.png"},{"key":"ORTO","url":"https://geoserveis.icgc.cat/styles/icgc_orto_estandard.json","image":"https://visors.icgc.cat/contextmaps/imatges_estil/icgc_orto_estandard.png"},{"key":"ORTO3D","url":"https://eines.icgc.cat/recursos//styles/icgc_orto_3d.json","image":"https://visors.icgc.cat/contextmaps/imatges_estil/icgc_orto_estandard.png"},{"key":"ORTOHYBRID","url":"https://geoserveis.icgc.cat/styles/icgc_orto_hibrida.json","image":"https://visors.icgc.cat/contextmaps/imatges_estil/icgc_orto_hibrida.png"},{"key":"ADMIN","url":"https://geoserveis.icgc.cat/styles/icgc_limits_administratius_gris.json","image":"https://visors.icgc.cat/contextmaps/imatges_estil/icgc_delimitacio_limits_administratius.png"},{"key":"DARK","url":"https://geoserveis.icgc.cat/styles/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/styles/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/styles/icgc_geologic_informacio.json","image":"https://visors.icgc.cat/contextmaps/imatges_estil/icgc_geologic_informacio.png"},{"key":"RASTER","substyles":{"TOPO":{"url":"https://geoserveis.icgc.cat/servei/catalunya/mapa-base/wmts/topografic/MON3857NW/{z}/{x}/{y}.png","image":"https://icgc-web-pro.s3.eu-central-1.amazonaws.com/produccio/s3fs-public/2024-10/mapabase_topo.jpg"},"ADMIN":{"url":"https://geoserveis.icgc.cat/servei/catalunya/mapa-base/wmts/administratiu/MON3857NW/{z}/{x}/{y}.png","image":"https://icgc-web-pro.s3.eu-central-1.amazonaws.com/produccio/s3fs-public/2024-10/mapabase_administratiu.jpg"},"LIGHT":{"url":"https://geoserveis.icgc.cat/servei/catalunya/mapa-base/wmts/topografic-gris/MON3857NW/{z}/{x}/{y}.png","image":"https://icgc-web-pro.s3.eu-central-1.amazonaws.com/produccio/s3fs-public/2024-10/mapabase_topo_gris.jpg"},"STANDARD":{"url":"https://geoserveis.icgc.cat/servei/catalunya/mapa-base/wmts/estandard/MON3857NW/{z}/{x}/{y}.png","image":"https://icgc-web-pro.s3.eu-central-1.amazonaws.com/produccio/s3fs-public/2024-10/mapabase_estandard_0.jpg"},"Simplified":{"url":"https://geoserveis.icgc.cat/servei/catalunya/mapa-base/wmts/simplificat/MON3857NW/{z}/{x}/{y}.png","image":"https://icgc-web-pro.s3.eu-central-1.amazonaws.com/produccio/s3fs-public/2024-10/mapabase_simplificat.jpg"},"ORTO":{"url":"https://geoserveis.icgc.cat/servei/catalunya/mapa-base/wmts/orto/MON3857NW/{z}/{x}/{y}.png","image":"https://icgc-web-pro.s3.eu-central-1.amazonaws.com/produccio/s3fs-public/2024-10/mapabase_orto.jpg"},"ORTOGREY":{"url":"https://geoserveis.icgc.cat/servei/catalunya/mapa-base/wmts/orto-gris/MON3857NW/{z}/{x}/{y}.png","image":"https://icgc-web-pro.s3.eu-central-1.amazonaws.com/produccio/s3fs-public/2024-10/mapabase_orto_gris.jpg"},"ORTOHYBRID":{"url":"https://geoserveis.icgc.cat/servei/catalunya/mapa-base/wmts/orto-hibrida/MON3857NW/{z}/{x}/{y}.png","image":"https://icgc-web-pro.s3.eu-central-1.amazonaws.com/produccio/s3fs-public/2024-10/mapabase_orto_hibida.jpg"}}}],"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":"ortofotoColor2023","key":"ortofoto_color_2023","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_2023"},{"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":"ortofotoInfraroig2023","key":"ortofoto_infraroig_2023","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_2023"},{"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":"districtesCensals2023","key":"districtes_censals_2023"},{"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":"seccionsCensals2023","key":"seccions_censals_2023"},{"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://eines.icgc.cat/recursos//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/styles/icgc_mapa_base_topografic.json`,ORTO:`https://geoserveis.icgc.cat/styles/icgc_orto_estandard.json`,ORTO3D:`https://eines.icgc.cat/recursos//styles/icgc_orto_3d.json`,ORTOHYBRID:`https://geoserveis.icgc.cat/styles/icgc_orto_hibrida.json`,ADMIN:`https://geoserveis.icgc.cat/styles/icgc_limits_administratius_gris.json`,DARK:`https://geoserveis.icgc.cat/styles/icgc_mapa_base_fosc.json`,LIGHT:`https://geoserveis.icgc.cat/styles/icgc_mapa_base_gris.json`,GEOLOGY:`https://geoserveis.icgc.cat/styles/icgc_geologic_informacio.json`,RASTER:{TOPO:`https://geoserveis.icgc.cat/servei/catalunya/mapa-base/wmts/topografic/MON3857NW/{z}/{x}/{y}.png`,ADMIN:`https://geoserveis.icgc.cat/servei/catalunya/mapa-base/wmts/administratiu/MON3857NW/{z}/{x}/{y}.png`,LIGHT:`https://geoserveis.icgc.cat/servei/catalunya/mapa-base/wmts/topografic-gris/MON3857NW/{z}/{x}/{y}.png`,STANDARD:`https://geoserveis.icgc.cat/servei/catalunya/mapa-base/wmts/estandard/MON3857NW/{z}/{x}/{y}.png`,SIMPLIFIED:`https://geoserveis.icgc.cat/servei/catalunya/mapa-base/wmts/simplificat/MON3857NW/{z}/{x}/{y}.png`,ORTO:`https://geoserveis.icgc.cat/servei/catalunya/mapa-base/wmts/orto/MON3857NW/{z}/{x}/{y}.png`,ORTOGREY:`https://geoserveis.icgc.cat/servei/catalunya/mapa-base/wmts/orto-gris/MON3857NW/{z}/{x}/{y}.png`,ORTOHYBRID:`https://geoserveis.icgc.cat/servei/catalunya/mapa-base/wmts/orto-hibrida/MON3857NW/{z}/{x}/{y}.png`}},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:JSON.parse(`{"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","ortofotoColor2023":"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-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_2023","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","ortofotoInfraroig2023":"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-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_2023","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","districtesCensals2023":"districtes_censals_2023","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","seccionsCensals2023":"seccions_censals_2023","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"}}`)},V8=class{constructor(e){this.options=e||{}}onAdd(e){let t=B8.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._img1.style.opacity=t.logoIcgcOptions.logoOpacity,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._img2.style.opacity=t.logoGencatOptions.logoOpacity,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}},H8=class{constructor(e){this.options=e||{}}onAdd(e){this._map=e,this._img1=document.createElement(`img`),this._img1.src=this.options.url,this._img1.width=150,this._img1.title=300,this.controlContainer=document.createElement(`div`),this.controlContainer.classList.add(`maplibregl-ctrl`),this.controlContainer.classList.add(`maplibregl-ctrl-group`),this.legendContainer=document.createElement(`div`),this.legendContainer.classList.add(`maplibregl-legend-list`),this.legendButton=document.createElement(`button`),this.legendButton.classList.add(`maplibregl-ctrl-icon`),this.legendButton.classList.add(`maplibregl-legend-switcher`),this.legendButton.addEventListener(`click`,()=>{this.legendButton.style.display=`none`,this.legendContainer.style.display=`block`}),document.addEventListener(`click`,this.onDocumentClick),this.controlContainer.appendChild(this.legendButton),this.controlContainer.appendChild(this.legendContainer),this.closeButton=document.createElement(`button`),this.closeButton.textContent=`x`,this.closeButton.classList.add(`maplibregl-legend-close-button`),this.closeButton.addEventListener(`click`,()=>{this.legendButton.style.display=`block`,this.legendContainer.style.display=`none`}),this.legendContainer.appendChild(this.closeButton);let t=document.createElement(`label`);return t.classList.add(`maplibregl-legend-title-label`),t.textContent=this.options.idLayer||`Llegenda`,this.legendContainer.appendChild(t),this.legendContainer.appendChild(document.createElement(`br`)),this.legendContainer.appendChild(this._img1),this.controlContainer}},U8=d(c(((e,t)=>{var n=i.prototype,r=`WGS 84`;function i(e){e!==void 0&&(r=e),this.setEllipsoid(r)}n.convertLatLngToUtm=function(e,t,n){var i;if(this.status)return`No ecclipsoid data associated with unknown datum: `+r;if(!Number.isInteger(n))return`Precision is not integer number.`;e=parseFloat(e),t=parseFloat(t);var o=t,s=this.toRadians(e),c=this.toRadians(o);o>=8&&o<=13&&e>54.5&&e<58||e>=56&&e<64&&o>=3&&o<12?i=32:(i=(o+180)/6+1,e>=72&&e<84&&(o>=0&&o<9?i=31:o>=9&&o<21?i=33:o>=21&&o<33?i=35:o>=33&&o<42&&(i=37))),i=parseInt(i);var l=(i-1)*6-180+3,u=this.toRadians(l),d=this.getUtmLetterDesignator(e),f=this.eccSquared/(1-this.eccSquared),p=this.a/Math.sqrt(1-this.eccSquared*Math.sin(s)*Math.sin(s)),m=Math.tan(s)*Math.tan(s),h=f*Math.cos(s)*Math.cos(s),g=Math.cos(s)*(c-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)),v=parseFloat(.9996*p*(g+(1-m+h)*g*g*g/6+(5-18*m+m*m+72*h-58*f)*g*g*g*g*g/120)+5e5),y=parseFloat(.9996*(_+p*Math.tan(s)*(g*g/2+(5-m+9*h+4*h*h)*g*g*g*g/24+(61-58*m+m*m+600*h-330*f)*g*g*g*g*g*g/720)));return e<0&&(y+=1e7),y=a(y,n),v=a(v,n),{Easting:v,Northing:y,ZoneNumber:parseInt(i),ZoneLetter:d}},n.convertUtmToLatLng=function(e,t,n,r){var i=(1-Math.sqrt(1-this.eccSquared))/(1+Math.sqrt(1-this.eccSquared)),a=e-5e5,o=t,s=n,c=r;if(e===void 0)return`Please pass the UTMEasting!`;if(t===void 0)return`Please pass the UTMNorthing!`;if(n===void 0)return`Please pass the UTMZoneNumber!`;if(r===void 0)return`Please pass the UTMZoneLetter!`;[`N`,`P`,`Q`,`R`,`S`,`T`,`U`,`V`,`W`,`X`,`Y`,`Z`].indexOf(c)!==-1||(o-=1e7);var l=(s-1)*6-180+3,u=this.eccSquared/(1-this.eccSquared),d=o/.9996/(this.a*(1-this.eccSquared/4-3*this.eccSquared*this.eccSquared/64-5*this.eccSquared*this.eccSquared*this.eccSquared/256)),f=d+(3*i/2-27*i*i*i/32)*Math.sin(2*d)+(21*i*i/16-55*i*i*i*i/32)*Math.sin(4*d)+151*i*i*i/96*Math.sin(6*d);this.toDegrees(f);var p=this.a/Math.sqrt(1-this.eccSquared*Math.sin(f)*Math.sin(f)),m=Math.tan(f)*Math.tan(f),h=u*Math.cos(f)*Math.cos(f),g=this.a*(1-this.eccSquared)/(1-this.eccSquared*Math.sin(f)*Math.sin(f))**1.5,_=a/(p*.9996),v=f-p*Math.tan(f)/g*(_*_/2-(5+3*m+10*h-4*h*h-9*u)*_*_*_*_/24+(61+90*m+298*h+45*m*m-252*u-3*h*h)*_*_*_*_*_*_/720);v=this.toDegrees(v);var y=(_-(1+2*m+h)*_*_*_/6+(5-2*h+28*m-3*h*h+8*u+24*m*m)*_*_*_*_*_/120)/Math.cos(f);return y=l+this.toDegrees(y),{lat:v,lng:y}},n.getUtmLetterDesignator=function(e){return e=parseFloat(e),84>=e&&e>=72?`X`:72>e&&e>=64?`W`:64>e&&e>=56?`V`:56>e&&e>=48?`U`:48>e&&e>=40?`T`:40>e&&e>=32?`S`:32>e&&e>=24?`R`:24>e&&e>=16?`Q`:16>e&&e>=8?`P`:8>e&&e>=0?`N`:0>e&&e>=-8?`M`:-8>e&&e>=-16?`L`:-16>e&&e>=-24?`K`:-24>e&&e>=-32?`J`:-32>e&&e>=-40?`H`:-40>e&&e>=-48?`G`:-48>e&&e>=-56?`F`:-56>e&&e>=-64?`E`:-64>e&&e>=-72?`D`:-72>e&&e>=-80?`C`:`Z`},n.setEllipsoid=function(e){switch(e){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}},n.toDegrees=function(e){return e/Math.PI*180},n.toRadians=function(e){return e*Math.PI/180};function a(e,t){var n=10**t;return Math.round(e*n)/n}t.exports=i}))()),W8=class{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){let t=new U8.default;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`,e=>{let n=e.lngLat.lat,r=e.lngLat.lng,i=``,a=``,o=t.convertLatLngToUtm(n,r,2),s=n>0?`N`:`S`;this.options.utm&&(i=`ETRS89 UTM ${o.ZoneNumber}${s} X:<b> ${o.Easting}</b> Y:<b> ${o.Northing}</b> <br>`),this.options.lonlat&&(a=`WGS 84 Lon:<b> ${r.toFixed(5)}</b> Lat:<b> ${n.toFixed(5)}</b>`);let c=`${i}${a}`;this._container.innerHTML=c}),this._container}_lookUTM31(e,t){return e>=0&&e<=6&&t>=0&&t<=84}onRemove(){this._container.parentNode.removeChild(this._container),this._map=void 0}};function G8(e,t){return function(){return e.apply(t,arguments)}}var{toString:K8}=Object.prototype,{getPrototypeOf:q8}=Object,{iterator:J8,toStringTag:Y8}=Symbol,X8=(e=>t=>{let n=K8.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Z8=e=>(e=e.toLowerCase(),t=>X8(t)===e),Q8=e=>t=>typeof t===e,{isArray:$8}=Array,e5=Q8(`undefined`);function t5(e){return e!==null&&!e5(e)&&e.constructor!==null&&!e5(e.constructor)&&a5(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var n5=Z8(`ArrayBuffer`);function r5(e){let t;return t=typeof ArrayBuffer<`u`&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&n5(e.buffer),t}var i5=Q8(`string`),a5=Q8(`function`),o5=Q8(`number`),s5=e=>typeof e==`object`&&!!e,c5=e=>e===!0||e===!1,l5=e=>{if(X8(e)!==`object`)return!1;let t=q8(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Y8 in e)&&!(J8 in e)},u5=e=>{if(!s5(e)||t5(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},d5=Z8(`Date`),f5=Z8(`File`),p5=e=>!!(e&&e.uri!==void 0),m5=e=>e&&e.getParts!==void 0,h5=Z8(`Blob`),g5=Z8(`FileList`),_5=e=>s5(e)&&a5(e.pipe);function v5(){return typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:typeof global<`u`?global:{}}var y5=v5(),b5=y5.FormData===void 0?void 0:y5.FormData,x5=e=>{let t;return e&&(b5&&e instanceof b5||a5(e.append)&&((t=X8(e))===`formdata`||t===`object`&&a5(e.toString)&&e.toString()===`[object FormData]`))},S5=Z8(`URLSearchParams`),[C5,w5,T5,E5]=[`ReadableStream`,`Request`,`Response`,`Headers`].map(Z8),D5=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,``);function O5(e,t,{allOwnKeys:n=!1}={}){if(e==null)return;let r,i;if(typeof e!=`object`&&(e=[e]),$8(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{if(t5(e))return;let i=n?Object.getOwnPropertyNames(e):Object.keys(e),a=i.length,o;for(r=0;r<a;r++)o=i[r],t.call(null,e[o],o,e)}}function k5(e,t){if(t5(e))return null;t=t.toLowerCase();let n=Object.keys(e),r=n.length,i;for(;r-- >0;)if(i=n[r],t===i.toLowerCase())return i;return null}var A5=typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:global,j5=e=>!e5(e)&&e!==A5;function M5(){let{caseless:e,skipUndefined:t}=j5(this)&&this||{},n={},r=(r,i)=>{if(i===`__proto__`||i===`constructor`||i===`prototype`)return;let a=e&&k5(n,i)||i;l5(n[a])&&l5(r)?n[a]=M5(n[a],r):l5(r)?n[a]=M5({},r):$8(r)?n[a]=r.slice():(!t||!e5(r))&&(n[a]=r)};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&O5(arguments[e],r);return n}var N5=(e,t,n,{allOwnKeys:r}={})=>(O5(t,(t,r)=>{n&&a5(t)?Object.defineProperty(e,r,{value:G8(t,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,r,{value:t,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),P5=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),F5=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,`constructor`,{value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,`super`,{value:t.prototype}),n&&Object.assign(e.prototype,n)},I5=(e,t,n,r)=>{let i,a,o,s={};if(t||={},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),a=i.length;a-- >0;)o=i[a],(!r||r(o,e,t))&&!s[o]&&(t[o]=e[o],s[o]=!0);e=n!==!1&&q8(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},L5=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;let r=e.indexOf(t,n);return r!==-1&&r===n},R5=e=>{if(!e)return null;if($8(e))return e;let t=e.length;if(!o5(t))return null;let n=Array(t);for(;t-- >0;)n[t]=e[t];return n},z5=(e=>t=>e&&t instanceof e)(typeof Uint8Array<`u`&&q8(Uint8Array)),B5=(e,t)=>{let n=(e&&e[J8]).call(e),r;for(;(r=n.next())&&!r.done;){let n=r.value;t.call(e,n[0],n[1])}},V5=(e,t)=>{let n,r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},H5=Z8(`HTMLFormElement`),U5=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n}),W5=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),G5=Z8(`RegExp`),K5=(e,t)=>{let n=Object.getOwnPropertyDescriptors(e),r={};O5(n,(n,i)=>{let a;(a=t(n,i,e))!==!1&&(r[i]=a||n)}),Object.defineProperties(e,r)},q5=e=>{K5(e,(t,n)=>{if(a5(e)&&[`arguments`,`caller`,`callee`].indexOf(n)!==-1)return!1;let r=e[n];if(a5(r)){if(t.enumerable=!1,`writable`in t){t.writable=!1;return}t.set||=()=>{throw Error(`Can not rewrite read-only method '`+n+`'`)}}})},J5=(e,t)=>{let n={},r=e=>{e.forEach(e=>{n[e]=!0})};return $8(e)?r(e):r(String(e).split(t)),n},Y5=()=>{},X5=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Z5(e){return!!(e&&a5(e.append)&&e[Y8]===`FormData`&&e[J8])}var Q5=e=>{let t=Array(10),n=(e,r)=>{if(s5(e)){if(t.indexOf(e)>=0)return;if(t5(e))return e;if(!(`toJSON`in e)){t[r]=e;let i=$8(e)?[]:{};return O5(e,(e,t)=>{let a=n(e,r+1);!e5(a)&&(i[t]=a)}),t[r]=void 0,i}}return e};return n(e,0)},$5=Z8(`AsyncFunction`),e7=e=>e&&(s5(e)||a5(e))&&a5(e.then)&&a5(e.catch),t7=((e,t)=>e?setImmediate:t?((e,t)=>(A5.addEventListener(`message`,({source:n,data:r})=>{n===A5&&r===e&&t.length&&t.shift()()},!1),n=>{t.push(n),A5.postMessage(e,`*`)}))(`axios@${Math.random()}`,[]):e=>setTimeout(e))(typeof setImmediate==`function`,a5(A5.postMessage)),$={isArray:$8,isArrayBuffer:n5,isBuffer:t5,isFormData:x5,isArrayBufferView:r5,isString:i5,isNumber:o5,isBoolean:c5,isObject:s5,isPlainObject:l5,isEmptyObject:u5,isReadableStream:C5,isRequest:w5,isResponse:T5,isHeaders:E5,isUndefined:e5,isDate:d5,isFile:f5,isReactNativeBlob:p5,isReactNative:m5,isBlob:h5,isRegExp:G5,isFunction:a5,isStream:_5,isURLSearchParams:S5,isTypedArray:z5,isFileList:g5,forEach:O5,merge:M5,extend:N5,trim:D5,stripBOM:P5,inherits:F5,toFlatObject:I5,kindOf:X8,kindOfTest:Z8,endsWith:L5,toArray:R5,forEachEntry:B5,matchAll:V5,isHTMLForm:H5,hasOwnProperty:W5,hasOwnProp:W5,reduceDescriptors:K5,freezeMethods:q5,toObjectSet:J5,toCamelCase:U5,noop:Y5,toFiniteNumber:X5,findKey:k5,global:A5,isContextDefined:j5,isSpecCompliantForm:Z5,toJSONObject:Q5,isAsyncFn:$5,isThenable:e7,setImmediate:t7,asap:typeof queueMicrotask<`u`?queueMicrotask.bind(A5):typeof process<`u`&&process.nextTick||t7,isIterable:e=>e!=null&&a5(e[J8])},n7=class e extends Error{static from(t,n,r,i,a,o){let s=new e(t.message,n||t.code,r,i,a);return s.cause=t,s.name=t.name,t.status!=null&&s.status==null&&(s.status=t.status),o&&Object.assign(s,o),s}constructor(e,t,n,r,i){super(e),Object.defineProperty(this,`message`,{value:e,enumerable:!0,writable:!0,configurable:!0}),this.name=`AxiosError`,this.isAxiosError=!0,t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:$.toJSONObject(this.config),code:this.code,status:this.status}}};n7.ERR_BAD_OPTION_VALUE=`ERR_BAD_OPTION_VALUE`,n7.ERR_BAD_OPTION=`ERR_BAD_OPTION`,n7.ECONNABORTED=`ECONNABORTED`,n7.ETIMEDOUT=`ETIMEDOUT`,n7.ERR_NETWORK=`ERR_NETWORK`,n7.ERR_FR_TOO_MANY_REDIRECTS=`ERR_FR_TOO_MANY_REDIRECTS`,n7.ERR_DEPRECATED=`ERR_DEPRECATED`,n7.ERR_BAD_RESPONSE=`ERR_BAD_RESPONSE`,n7.ERR_BAD_REQUEST=`ERR_BAD_REQUEST`,n7.ERR_CANCELED=`ERR_CANCELED`,n7.ERR_NOT_SUPPORT=`ERR_NOT_SUPPORT`,n7.ERR_INVALID_URL=`ERR_INVALID_URL`;function r7(e){return $.isPlainObject(e)||$.isArray(e)}function i7(e){return $.endsWith(e,`[]`)?e.slice(0,-2):e}function a7(e,t,n){return e?e.concat(t).map(function(e,t){return e=i7(e),!n&&t?`[`+e+`]`:e}).join(n?`.`:``):t}function o7(e){return $.isArray(e)&&!e.some(r7)}var s7=$.toFlatObject($,{},null,function(e){return/^is[A-Z]/.test(e)});function c7(e,t,n){if(!$.isObject(e))throw TypeError(`target must be an object`);t||=new FormData,n=$.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!$.isUndefined(t[e])});let r=n.metaTokens,i=n.visitor||l,a=n.dots,o=n.indexes,s=(n.Blob||typeof Blob<`u`&&Blob)&&$.isSpecCompliantForm(t);if(!$.isFunction(i))throw TypeError(`visitor must be a function`);function c(e){if(e===null)return``;if($.isDate(e))return e.toISOString();if($.isBoolean(e))return e.toString();if(!s&&$.isBlob(e))throw new n7(`Blob is not supported. Use a Buffer instead.`);return $.isArrayBuffer(e)||$.isTypedArray(e)?s&&typeof Blob==`function`?new Blob([e]):Buffer.from(e):e}function l(e,n,i){let s=e;if($.isReactNative(t)&&$.isReactNativeBlob(e))return t.append(a7(i,n,a),c(e)),!1;if(e&&!i&&typeof e==`object`){if($.endsWith(n,`{}`))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if($.isArray(e)&&o7(e)||($.isFileList(e)||$.endsWith(n,`[]`))&&(s=$.toArray(e)))return n=i7(n),s.forEach(function(e,r){!($.isUndefined(e)||e===null)&&t.append(o===!0?a7([n],r,a):o===null?n:n+`[]`,c(e))}),!1}return r7(e)?!0:(t.append(a7(i,n,a),c(e)),!1)}let u=[],d=Object.assign(s7,{defaultVisitor:l,convertValue:c,isVisitable:r7});function f(e,n){if(!$.isUndefined(e)){if(u.indexOf(e)!==-1)throw Error(`Circular reference detected in `+n.join(`.`));u.push(e),$.forEach(e,function(e,r){(!($.isUndefined(e)||e===null)&&i.call(t,e,$.isString(r)?r.trim():r,n,d))===!0&&f(e,n?n.concat(r):[r])}),u.pop()}}if(!$.isObject(e))throw TypeError(`data must be an object`);return f(e),t}function l7(e){let t={"!":`%21`,"'":`%27`,"(":`%28`,")":`%29`,"~":`%7E`,"%20":`+`,"%00":`\0`};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function u7(e,t){this._pairs=[],e&&c7(e,this,t)}var d7=u7.prototype;d7.append=function(e,t){this._pairs.push([e,t])},d7.toString=function(e){let t=e?function(t){return e.call(this,t,l7)}:l7;return this._pairs.map(function(e){return t(e[0])+`=`+t(e[1])},``).join(`&`)};function f7(e){return encodeURIComponent(e).replace(/%3A/gi,`:`).replace(/%24/g,`$`).replace(/%2C/gi,`,`).replace(/%20/g,`+`)}function p7(e,t,n){if(!t)return e;let r=n&&n.encode||f7,i=$.isFunction(n)?{serialize:n}:n,a=i&&i.serialize,o;if(o=a?a(t,i):$.isURLSearchParams(t)?t.toString():new u7(t,i).toString(r),o){let t=e.indexOf(`#`);t!==-1&&(e=e.slice(0,t)),e+=(e.indexOf(`?`)===-1?`?`:`&`)+o}return e}var m7=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&=[]}forEach(e){$.forEach(this.handlers,function(t){t!==null&&e(t)})}},h7={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},g7={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<`u`?URLSearchParams:u7,FormData:typeof FormData<`u`?FormData:null,Blob:typeof Blob<`u`?Blob:null},protocols:[`http`,`https`,`file`,`blob`,`url`,`data`]},_7=l({hasBrowserEnv:()=>v7,hasStandardBrowserEnv:()=>b7,hasStandardBrowserWebWorkerEnv:()=>x7,navigator:()=>y7,origin:()=>S7}),v7=typeof window<`u`&&typeof document<`u`,y7=typeof navigator==`object`&&navigator||void 0,b7=v7&&(!y7||[`ReactNative`,`NativeScript`,`NS`].indexOf(y7.product)<0),x7=typeof WorkerGlobalScope<`u`&&self instanceof WorkerGlobalScope&&typeof self.importScripts==`function`,S7=v7&&window.location.href||`http://localhost`,C7={..._7,...g7};function w7(e,t){return c7(e,new C7.classes.URLSearchParams,{visitor:function(e,t,n,r){return C7.isNode&&$.isBuffer(e)?(this.append(t,e.toString(`base64`)),!1):r.defaultVisitor.apply(this,arguments)},...t})}function T7(e){return $.matchAll(/\w+|\[(\w*)]/g,e).map(e=>e[0]===`[]`?``:e[1]||e[0])}function E7(e){let t={},n=Object.keys(e),r,i=n.length,a;for(r=0;r<i;r++)a=n[r],t[a]=e[a];return t}function D7(e){function t(e,n,r,i){let a=e[i++];if(a===`__proto__`)return!0;let o=Number.isFinite(+a),s=i>=e.length;return a=!a&&$.isArray(r)?r.length:a,s?($.hasOwnProp(r,a)?r[a]=[r[a],n]:r[a]=n,!o):((!r[a]||!$.isObject(r[a]))&&(r[a]=[]),t(e,n,r[a],i)&&$.isArray(r[a])&&(r[a]=E7(r[a])),!o)}if($.isFormData(e)&&$.isFunction(e.entries)){let n={};return $.forEachEntry(e,(e,r)=>{t(T7(e),r,n,0)}),n}return null}function O7(e,t,n){if($.isString(e))try{return(t||JSON.parse)(e),$.trim(e)}catch(e){if(e.name!==`SyntaxError`)throw e}return(n||JSON.stringify)(e)}var k7={transitional:h7,adapter:[`xhr`,`http`,`fetch`],transformRequest:[function(e,t){let n=t.getContentType()||``,r=n.indexOf(`application/json`)>-1,i=$.isObject(e);if(i&&$.isHTMLForm(e)&&(e=new FormData(e)),$.isFormData(e))return r?JSON.stringify(D7(e)):e;if($.isArrayBuffer(e)||$.isBuffer(e)||$.isStream(e)||$.isFile(e)||$.isBlob(e)||$.isReadableStream(e))return e;if($.isArrayBufferView(e))return e.buffer;if($.isURLSearchParams(e))return t.setContentType(`application/x-www-form-urlencoded;charset=utf-8`,!1),e.toString();let a;if(i){if(n.indexOf(`application/x-www-form-urlencoded`)>-1)return w7(e,this.formSerializer).toString();if((a=$.isFileList(e))||n.indexOf(`multipart/form-data`)>-1){let t=this.env&&this.env.FormData;return c7(a?{"files[]":e}:e,t&&new t,this.formSerializer)}}return i||r?(t.setContentType(`application/json`,!1),O7(e)):e}],transformResponse:[function(e){let t=this.transitional||k7.transitional,n=t&&t.forcedJSONParsing,r=this.responseType===`json`;if($.isResponse(e)||$.isReadableStream(e))return e;if(e&&$.isString(e)&&(n&&!this.responseType||r)){let n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e,this.parseReviver)}catch(e){if(n)throw e.name===`SyntaxError`?n7.from(e,n7.ERR_BAD_RESPONSE,this,null,this.response):e}}return e}],timeout:0,xsrfCookieName:`XSRF-TOKEN`,xsrfHeaderName:`X-XSRF-TOKEN`,maxContentLength:-1,maxBodyLength:-1,env:{FormData:C7.classes.FormData,Blob:C7.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:`application/json, text/plain, */*`,"Content-Type":void 0}}};$.forEach([`delete`,`get`,`head`,`post`,`put`,`patch`],e=>{k7.headers[e]={}});var A7=$.toObjectSet([`age`,`authorization`,`content-length`,`content-type`,`etag`,`expires`,`from`,`host`,`if-modified-since`,`if-unmodified-since`,`last-modified`,`location`,`max-forwards`,`proxy-authorization`,`referer`,`retry-after`,`user-agent`]),j7=e=>{let t={},n,r,i;return e&&e.split(`
|
|
5801
|
+
${this._localize(`errorNoResults`)}</div>`;this._renderMessage(e)}_renderMessage(e){this._typeahead.update([]),this._typeahead.selected=null,this._typeahead.clear(),this._typeahead.renderError(e)}_localize(e){let t=E8.language(this.options.language.split(`,`)[0]);return this.options.language&&L8?.[e][t]?L8[e][t]:L8[e].en}_fitBoundsForMarkers(){if(this._typeahead.data.length<1)return;let e=this._typeahead.data.filter(e=>typeof e!=`string`).slice(0,this.options.limit);if(this._clearEl.style.display=`none`,this.options.flyTo&&this._maplibregl&&this._map){let t=j8({},{padding:100},this.options.flyTo),n=new this._maplibregl.LngLatBounds;for(let t of e)`geometry`in t&&t.geometry?.type===`Point`&&n.extend(t.geometry.coordinates);this._map.fitBounds(n,t)}return e.length>0&&this._maplibregl&&this._handleResultMarkers(e),this}setInput(e){return this._inputEl.value=e,this._typeahead.selected=null,this._typeahead.clear(),e.length>=this.options.minLength&&this.options.showResultsWhileTyping&&this._geocode(e),this}setProximity(e){return this.options.proximity=e,this}getProximity(){return this.options.proximity}setRenderFunction(e){return e&&typeof e==`function`&&(this._typeahead.render=e),this}getRenderFunction(){return this._typeahead.render}setLanguage(e){return this.options.language=e||this.options.language||navigator.language,this}getLanguage(){return this.options.language}getZoom(){return this.options.zoom}setZoom(e){return this.options.zoom=e,this}getFlyTo(){return this.options.flyTo}setFlyTo(e){return this.options.flyTo=e,this}getPlaceholder(){return this.options.placeholder}setPlaceholder(e){return this.options.placeholder=e||this.options.placeholder||this._localize(`placeholder`),this._inputEl.placeholder=this.options.placeholder,this._inputEl.setAttribute(`aria-label`,this.options.placeholder),this}getBbox(){return this.options.bbox}setBbox(e){return this.options.bbox=e,this}getCountries(){return this.options.countries}setCountries(e){return this.options.countries=e,this}getTypes(){return this.options.types}setTypes(e){return this.options.types=e,this}getMinLength(){return this.options.minLength}setMinLength(e){return this.options.minLength=e,this._typeahead&&(this._typeahead.options.minLength=e),this}getLimit(){return this.options.limit}setLimit(e){return this.options.limit=e,this._typeahead&&(this._typeahead.options.limit=e),this}getFilter(){return this.options.filter}setFilter(e){return this.options.filter=e,this}setGeocoderApi(e){return this.geocoderApi=e,this}getGeocoderApi(){return this.geocoderApi}_handleMarker(e){if(!this._map)return;this._removeMarker();let t=j8({},{color:`#4668F2`},this.options.marker);this.mapMarker=new this._maplibregl.Marker(t);let n=null;if(this.options.popup){let t=j8({},{},this.options.popup);n=new this._maplibregl.Popup(t).setHTML(this.options.popupRender(e))}return e.center?(this.mapMarker.setLngLat(e.center).addTo(this._map),this.options.popup&&this.mapMarker.setPopup(n)):e.geometry?.type===`Point`&&e.geometry.coordinates&&(this.mapMarker.setLngLat(e.geometry.coordinates).addTo(this._map),this.options.popup&&this.mapMarker.setPopup(n)),this}_removeMarker(){this.mapMarker&&=(this.mapMarker.remove(),null)}_handleResultMarkers(e){if(!this._map)return;this._removeResultMarkers();let t=j8({},{color:`#4668F2`},this.options.showResultMarkers);for(let n of e){let e;if(this.options.showResultMarkers){this.options.showResultMarkers&&this.options.showResultMarkers.element&&(e=this.options.showResultMarkers.element.cloneNode(!0),t=j8(t,{element:e}));let r=new this._maplibregl.Marker(j8({},t,{element:e})),i;if(this.options.popup){let e=j8({},{},this.options.popup);i=new this._maplibregl.Popup(e).setHTML(this.options.popupRender(n))}n.center?(r.setLngLat(n.center).addTo(this._map),this.options.popup&&r.setPopup(i)):n.geometry&&n.geometry.type&&n.geometry.type===`Point`&&n.geometry.coordinates&&(r.setLngLat(n.geometry.coordinates).addTo(this._map),this.options.popup&&r.setPopup(i)),this.resultMarkers.push(r)}}return this}_removeResultMarkers(){this.resultMarkers&&this.resultMarkers.length>0&&(this.resultMarkers.forEach(function(e){e.remove()}),this.resultMarkers=[])}on(e,t){return this._eventEmitter.on(e,t),this}once(e){return new Promise(t=>{this._eventEmitter.once(e,t)})}off(e,t){return this._eventEmitter.removeListener(e,t),this}},B8={defaultOptions:JSON.parse(`{"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":false,"style":"https://geoserveis.icgc.cat/styles/mapa-base-estandard-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":[{"key":"TOPO","url":"https://geoserveis.icgc.cat/styles/mapa-base-topografic.json","image":"https://visors.icgc.cat/contextmaps/imatges_estil/icgc_mapa_estandard.png"},{"key":"ORTO","url":"https://geoserveis.icgc.cat/styles/mapa-base-orto.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/styles/mapa-base-administratiu.json","image":"https://visors.icgc.cat/contextmaps/imatges_estil/icgc_delimitacio_limits_administratius.png"},{"key":"DARK","url":"https://geoserveis.icgc.cat/styles/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/styles/mapa-base-estandard-gris.json","image":"https://visors.icgc.cat/contextmaps/imatges_estil/icgc_mapa_base_gris.png"},{"key":"GEOLOGY","url":"https://geoserveis.icgc.cat/styles/mapa-base-geologic.json","image":"https://visors.icgc.cat/contextmaps/imatges_estil/icgc_geologic_informacio.png"},{"key":"ORTOHYBRID","url":"https://geoserveis.icgc.cat/styles/mapa-base-orto-hibrida.json","image":"https://visors.icgc.cat/contextmaps/imatges_estil/icgc_orto_hibrida.png"}],"urlTerrainICGC":[{"name":"ICGC5M","url":"https://tilemaps.icgc.cat/tileserver/tileserver/terreny-5m-30m-rgb-extent/{z}/{x}/{y}.png"},{"name":"WORLD30M","url":"https://tiles.mapterhorn.com/{z}/{x}/{y}.webp","encoding":"terrarium","attribution":"<a href='https://mapterhorn.com/attribution'>© Mapterhorn</a>","tileSize":512}],"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":"ortofotoColorVigent","key":"ortofoto_color_vigent","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_vigent"},{"name":"ortofotoColor2025","key":"ortofoto_color_2025","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_2025"},{"name":"ortofotoColor2024","key":"ortofoto_color_2024","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_2024"},{"name":"ortofotoColor2023","key":"ortofoto_color_2023","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_2023"},{"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":"ortofotoInfraroigVigent","key":"ortofoto_infraroig_vigent","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_vigent"},{"name":"ortofotoInfraroig2025","key":"ortofoto_infraroig_2025","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_2025"},{"name":"ortofotoInfraroig2024","key":"ortofoto_infraroig_2024","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_2024"},{"name":"ortofotoInfraroig2023","key":"ortofoto_infraroig_2023","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_2023"},{"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":"ortofotoInfraroig2007","key":"ortofoto_infraroig_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_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"},{"name":"ortofotoGrisVigent","key":"ortofoto_gris_vigent","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_gris_vigent"}],"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":"agrupacionsCensals2022","key":"agrupacions_censals_2022"},{"name":"agrupacionsCensals2023","key":"agrupacions_censals_2023"},{"name":"agrupacionsCensals2024","key":"agrupacions_censals_2024"},{"name":"agrupacionsCensals2025","key":"agrupacions_censals_2025"},{"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":"areesBasiquesPolicials2023","key":"arees_basiques_policials_2023"},{"name":"areesBasiquesPolicials2023Text","key":"arees_basiques_policials_2023_text"},{"name":"areesBasiquesPolicialsVigent","key":"arees_basiques_policials_vigent"},{"name":"areesBasiquesPolicialsVigent2023","key":"arees_basiques_policials_vigent_2023"},{"name":"areesBasiquesPolicialsVigent2023Text","key":"arees_basiques_policials_vigent_2023_text"},{"name":"areesBasiquesPolicialsVigent2024","key":"arees_basiques_policials_vigent_2024"},{"name":"areesBasiquesPolicialsVigent2024Text","key":"arees_basiques_policials_vigent_2024_text"},{"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":"catalunya2025","key":"catalunya_2025"},{"name":"catalunyaVigent","key":"catalunya_vigent"},{"name":"catalunyaVigentText","key":"catalunya_vigent_text"},{"name":"comarques2022","key":"comarques_2022"},{"name":"comarques2025","key":"comarques_2025"},{"name":"comarques2026","key":"comarques_2026"},{"name":"comarquesVigent","key":"comarques_vigent"},{"name":"comarquesVigentText","key":"comarques_vigent_text"},{"name":"comarquesVigents","key":"comarques_vigents"},{"name":"comarquesVigentsText","key":"comarques_vigents_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":"districtesCensals2023","key":"districtes_censals_2023"},{"name":"districtesCensals2024","key":"districtes_censals_2024"},{"name":"districtesCensals2025","key":"districtes_censals_2025"},{"name":"districtesCensalsVigent","key":"districtes_censals_vigent"},{"name":"districtesCensalsVigentText","key":"districtes_censals_vigent_text"},{"name":"espaisNaturalsEnpeVigent","key":"espais_naturals_enpe_vigent"},{"name":"espaisNaturalsEnpeVigentText","key":"espais_naturals_enpe_vigent_text"},{"name":"espaisNaturalsPeinVigent","key":"espais_naturals_pein_vigent"},{"name":"espaisNaturalsPeinVigentText","key":"espais_naturals_pein_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":"municipis2025","key":"municipis_2025"},{"name":"municipis2026","key":"municipis_2026"},{"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":"plaTerritorial2019","key":"pla_territorial_2019"},{"name":"plaTerritorial2020","key":"pla_territorial_2020"},{"name":"plaTerritorial2021","key":"pla_territorial_2021"},{"name":"plaTerritorial2022","key":"pla_territorial_2022"},{"name":"plaTerritorial2023","key":"pla_territorial_2023"},{"name":"plaTerritorial2024","key":"pla_territorial_2024"},{"name":"plaTerritorial2025","key":"pla_territorial_2025"},{"name":"plaTerritorialVigent","key":"pla_territorial_vigent"},{"name":"plaTerritorialVigentText","key":"pla_territorial_vigent_text"},{"name":"provincies2025","key":"provincies_2025"},{"name":"provinciesVigent","key":"provincies_vigent"},{"name":"provinciesVigentText","key":"provincies_vigent_text"},{"name":"provinciesVigents","key":"provincies_vigents"},{"name":"provinciesVigentsText","key":"provincies_vigents_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":"seccionsCensals2023","key":"seccions_censals_2023"},{"name":"seccionsCensals2024","key":"seccions_censals_2024"},{"name":"seccionsCensals2025","key":"seccions_censals_2025"},{"name":"seccionsCensalsVigent","key":"seccions_censals_vigent"},{"name":"seccionsCensalsVigentText","key":"seccions_censals_vigent_text"},{"name":"sectorsSanitarisVigent","key":"sectors_sanitaris_vigent"},{"name":"vegueries2025","key":"vegueries_2025"},{"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":"areesBasiquesPolicialsVigent2023","key":"arees_basiques_policials_vigent_2023","url":"https://tilemaps.icgc.cat/vector/fgb/arees_basiques_policials_vigent_2023.fgb"},{"name":"areesBasiquesPolicialsVigent2023Text","key":"arees_basiques_policials_vigent_2023_text","url":"https://tilemaps.icgc.cat/vector/fgb/arees_basiques_policials_vigent_2023_text.fgb"},{"name":"areesBasiquesPolicialsVigent2024","key":"arees_basiques_policials_vigent_2024","url":"https://tilemaps.icgc.cat/vector/fgb/arees_basiques_policials_vigent_2024.fgb"},{"name":"areesBasiquesPolicialsVigent2024Text","key":"arees_basiques_policials_vigent_2024_text","url":"https://tilemaps.icgc.cat/vector/fgb/arees_basiques_policials_vigent_2024_text.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":"comarquesVigents","key":"comarques_vigents","url":"https://tilemaps.icgc.cat/vector/fgb/comarques_vigents.fgb"},{"name":"comarquesVigentsText","key":"comarques_vigents_text","url":"https://tilemaps.icgc.cat/vector/fgb/comarques_vigents_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":"espaisNaturalsEnpeVigent","key":"espais_naturals_enpe_vigent","url":"https://tilemaps.icgc.cat/vector/fgb/espais_naturals_enpe_vigent.fgb"},{"name":"espaisNaturalsEnpeVigentText","key":"espais_naturals_enpe_vigent_text","url":"https://tilemaps.icgc.cat/vector/fgb/espais_naturals_enpe_vigent_text.fgb"},{"name":"espaisNaturalsPeinVigent","key":"espais_naturals_pein_vigent","url":"https://tilemaps.icgc.cat/vector/fgb/espais_naturals_pein_vigent.fgb"},{"name":"espaisNaturalsPeinVigentText","key":"espais_naturals_pein_vigent_text","url":"https://tilemaps.icgc.cat/vector/fgb/espais_naturals_pein_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":"provinciesVigents","key":"provincies_vigents","url":"https://tilemaps.icgc.cat/vector/fgb/provincies_vigents.fgb"},{"name":"provinciesVigentsText","key":"provincies_vigents_text","url":"https://tilemaps.icgc.cat/vector/fgb/provincies_vigents_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/styles/mapa-base-topografic.json`,ORTO:`https://geoserveis.icgc.cat/styles/mapa-base-orto.json`,ORTO3D:`https://tilemaps.icgc.cat/cdn/styles/icgc_orto_3d.json`,ADMIN:`https://geoserveis.icgc.cat/styles/mapa-base-administratiu.json`,DARK:`https://geoserveis.icgc.cat/styles/icgc_mapa_base_fosc.json`,LIGHT:`https://geoserveis.icgc.cat/styles/mapa-base-estandard-gris.json`,GEOLOGY:`https://geoserveis.icgc.cat/styles/mapa-base-geologic.json`,ORTOHYBRID:`https://geoserveis.icgc.cat/styles/mapa-base-orto-hibrida.json`},Terrains:{ICGC5M:`https://tilemaps.icgc.cat/tileserver/tileserver/terreny-5m-30m-rgb-extent/{z}/{x}/{y}.png`,WORLD30M:`https://tiles.mapterhorn.com/{z}/{x}/{y}.webp`},Layers:JSON.parse(`{"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","ortofotoColorVigent":"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-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_vigent","ortofotoColor2025":"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-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_2025","ortofotoColor2024":"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-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_2024","ortofotoColor2023":"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-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_2023","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","ortofotoInfraroigVigent":"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-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_vigent","ortofotoInfraroig2025":"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-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_2025","ortofotoInfraroig2024":"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-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_2024","ortofotoInfraroig2023":"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-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_2023","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","ortofotoInfraroig2007":"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-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_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","ortofotoGrisVigent":"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_gris_vigent"},"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","agrupacionsCensals2022":"agrupacions_censals_2022","agrupacionsCensals2023":"agrupacions_censals_2023","agrupacionsCensals2024":"agrupacions_censals_2024","agrupacionsCensals2025":"agrupacions_censals_2025","agrupacionsCensalsVigent":"agrupacions_censals_vigent","agrupacionsCensalsVigentText":"agrupacions_censals_vigent_text","areesBasiquesPolicials2019":"arees_basiques_policials_2019","areesBasiquesPolicials2020":"arees_basiques_policials_2020","areesBasiquesPolicials2022":"arees_basiques_policials_2022","areesBasiquesPolicials2023":"arees_basiques_policials_2023","areesBasiquesPolicials2023Text":"arees_basiques_policials_2023_text","areesBasiquesPolicialsVigent":"arees_basiques_policials_vigent","areesBasiquesPolicialsVigent2023":"arees_basiques_policials_vigent_2023","areesBasiquesPolicialsVigent2023Text":"arees_basiques_policials_vigent_2023_text","areesBasiquesPolicialsVigent2024":"arees_basiques_policials_vigent_2024","areesBasiquesPolicialsVigent2024Text":"arees_basiques_policials_vigent_2024_text","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","catalunya2025":"catalunya_2025","catalunyaVigent":"catalunya_vigent","catalunyaVigentText":"catalunya_vigent_text","comarques2022":"comarques_2022","comarques2025":"comarques_2025","comarques2026":"comarques_2026","comarquesVigent":"comarques_vigent","comarquesVigentText":"comarques_vigent_text","comarquesVigents":"comarques_vigents","comarquesVigentsText":"comarques_vigents_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","districtesCensals2023":"districtes_censals_2023","districtesCensals2024":"districtes_censals_2024","districtesCensals2025":"districtes_censals_2025","districtesCensalsVigent":"districtes_censals_vigent","districtesCensalsVigentText":"districtes_censals_vigent_text","espaisNaturalsEnpeVigent":"espais_naturals_enpe_vigent","espaisNaturalsEnpeVigentText":"espais_naturals_enpe_vigent_text","espaisNaturalsPeinVigent":"espais_naturals_pein_vigent","espaisNaturalsPeinVigentText":"espais_naturals_pein_vigent_text","incendisForestalsVigent":"incendis_forestals_vigent","incendisForestalsVigentText":"incendis_forestals_vigent_text","municipis2022":"municipis_2022","municipis2022Text":"municipis_2022_text","municipis2025":"municipis_2025","municipis2026":"municipis_2026","municipisVigent":"municipis_vigent","municipisVigentText":"municipis_vigent_text","partitsJudicialsVigent":"partits_judicials_vigent","partitsJudicialsVigentText":"partits_judicials_vigent_text","plaTerritorial2015":"pla_territorial_2015","plaTerritorial2019":"pla_territorial_2019","plaTerritorial2020":"pla_territorial_2020","plaTerritorial2021":"pla_territorial_2021","plaTerritorial2022":"pla_territorial_2022","plaTerritorial2023":"pla_territorial_2023","plaTerritorial2024":"pla_territorial_2024","plaTerritorial2025":"pla_territorial_2025","plaTerritorialVigent":"pla_territorial_vigent","plaTerritorialVigentText":"pla_territorial_vigent_text","provincies2025":"provincies_2025","provinciesVigent":"provincies_vigent","provinciesVigentText":"provincies_vigent_text","provinciesVigents":"provincies_vigents","provinciesVigentsText":"provincies_vigents_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","seccionsCensals2023":"seccions_censals_2023","seccionsCensals2024":"seccions_censals_2024","seccionsCensals2025":"seccions_censals_2025","seccionsCensalsVigent":"seccions_censals_vigent","seccionsCensalsVigentText":"seccions_censals_vigent_text","sectorsSanitarisVigent":"sectors_sanitaris_vigent","vegueries2025":"vegueries_2025","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","areesBasiquesPolicialsVigent2023":"https://tilemaps.icgc.cat/vector/fgb/arees_basiques_policials_vigent_2023.fgb","areesBasiquesPolicialsVigent2023Text":"https://tilemaps.icgc.cat/vector/fgb/arees_basiques_policials_vigent_2023_text.fgb","areesBasiquesPolicialsVigent2024":"https://tilemaps.icgc.cat/vector/fgb/arees_basiques_policials_vigent_2024.fgb","areesBasiquesPolicialsVigent2024Text":"https://tilemaps.icgc.cat/vector/fgb/arees_basiques_policials_vigent_2024_text.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","comarquesVigents":"https://tilemaps.icgc.cat/vector/fgb/comarques_vigents.fgb","comarquesVigentsText":"https://tilemaps.icgc.cat/vector/fgb/comarques_vigents_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","espaisNaturalsEnpeVigent":"https://tilemaps.icgc.cat/vector/fgb/espais_naturals_enpe_vigent.fgb","espaisNaturalsEnpeVigentText":"https://tilemaps.icgc.cat/vector/fgb/espais_naturals_enpe_vigent_text.fgb","espaisNaturalsPeinVigent":"https://tilemaps.icgc.cat/vector/fgb/espais_naturals_pein_vigent.fgb","espaisNaturalsPeinVigentText":"https://tilemaps.icgc.cat/vector/fgb/espais_naturals_pein_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","provinciesVigents":"https://tilemaps.icgc.cat/vector/fgb/provincies_vigents.fgb","provinciesVigentsText":"https://tilemaps.icgc.cat/vector/fgb/provincies_vigents_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"}}`)},V8=class{constructor(e){this.options=e||{}}onAdd(e){let t=B8.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._img1.style.opacity=t.logoIcgcOptions.logoOpacity,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._img2.style.opacity=t.logoGencatOptions.logoOpacity,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}},H8=class{constructor(e){this.options=e||{}}onAdd(e){this._map=e,this._img1=document.createElement(`img`),this._img1.src=this.options.url,this._img1.width=150,this._img1.title=300,this.controlContainer=document.createElement(`div`),this.controlContainer.classList.add(`maplibregl-ctrl`),this.controlContainer.classList.add(`maplibregl-ctrl-group`),this.legendContainer=document.createElement(`div`),this.legendContainer.classList.add(`maplibregl-legend-list`),this.legendButton=document.createElement(`button`),this.legendButton.classList.add(`maplibregl-ctrl-icon`),this.legendButton.classList.add(`maplibregl-legend-switcher`),this.legendButton.addEventListener(`click`,()=>{this.legendButton.style.display=`none`,this.legendContainer.style.display=`block`}),document.addEventListener(`click`,this.onDocumentClick),this.controlContainer.appendChild(this.legendButton),this.controlContainer.appendChild(this.legendContainer),this.closeButton=document.createElement(`button`),this.closeButton.textContent=`x`,this.closeButton.classList.add(`maplibregl-legend-close-button`),this.closeButton.addEventListener(`click`,()=>{this.legendButton.style.display=`block`,this.legendContainer.style.display=`none`}),this.legendContainer.appendChild(this.closeButton);let t=document.createElement(`label`);return t.classList.add(`maplibregl-legend-title-label`),t.textContent=this.options.idLayer||`Llegenda`,this.legendContainer.appendChild(t),this.legendContainer.appendChild(document.createElement(`br`)),this.legendContainer.appendChild(this._img1),this.controlContainer}},U8=d(c(((e,t)=>{var n=i.prototype,r=`WGS 84`;function i(e){e!==void 0&&(r=e),this.setEllipsoid(r)}n.convertLatLngToUtm=function(e,t,n){var i;if(this.status)return`No ecclipsoid data associated with unknown datum: `+r;if(!Number.isInteger(n))return`Precision is not integer number.`;e=parseFloat(e),t=parseFloat(t);var o=t,s=this.toRadians(e),c=this.toRadians(o);o>=8&&o<=13&&e>54.5&&e<58||e>=56&&e<64&&o>=3&&o<12?i=32:(i=(o+180)/6+1,e>=72&&e<84&&(o>=0&&o<9?i=31:o>=9&&o<21?i=33:o>=21&&o<33?i=35:o>=33&&o<42&&(i=37))),i=parseInt(i);var l=(i-1)*6-180+3,u=this.toRadians(l),d=this.getUtmLetterDesignator(e),f=this.eccSquared/(1-this.eccSquared),p=this.a/Math.sqrt(1-this.eccSquared*Math.sin(s)*Math.sin(s)),m=Math.tan(s)*Math.tan(s),h=f*Math.cos(s)*Math.cos(s),g=Math.cos(s)*(c-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)),v=parseFloat(.9996*p*(g+(1-m+h)*g*g*g/6+(5-18*m+m*m+72*h-58*f)*g*g*g*g*g/120)+5e5),y=parseFloat(.9996*(_+p*Math.tan(s)*(g*g/2+(5-m+9*h+4*h*h)*g*g*g*g/24+(61-58*m+m*m+600*h-330*f)*g*g*g*g*g*g/720)));return e<0&&(y+=1e7),y=a(y,n),v=a(v,n),{Easting:v,Northing:y,ZoneNumber:parseInt(i),ZoneLetter:d}},n.convertUtmToLatLng=function(e,t,n,r){var i=(1-Math.sqrt(1-this.eccSquared))/(1+Math.sqrt(1-this.eccSquared)),a=e-5e5,o=t,s=n,c=r;if(e===void 0)return`Please pass the UTMEasting!`;if(t===void 0)return`Please pass the UTMNorthing!`;if(n===void 0)return`Please pass the UTMZoneNumber!`;if(r===void 0)return`Please pass the UTMZoneLetter!`;[`N`,`P`,`Q`,`R`,`S`,`T`,`U`,`V`,`W`,`X`,`Y`,`Z`].indexOf(c)!==-1||(o-=1e7);var l=(s-1)*6-180+3,u=this.eccSquared/(1-this.eccSquared),d=o/.9996/(this.a*(1-this.eccSquared/4-3*this.eccSquared*this.eccSquared/64-5*this.eccSquared*this.eccSquared*this.eccSquared/256)),f=d+(3*i/2-27*i*i*i/32)*Math.sin(2*d)+(21*i*i/16-55*i*i*i*i/32)*Math.sin(4*d)+151*i*i*i/96*Math.sin(6*d);this.toDegrees(f);var p=this.a/Math.sqrt(1-this.eccSquared*Math.sin(f)*Math.sin(f)),m=Math.tan(f)*Math.tan(f),h=u*Math.cos(f)*Math.cos(f),g=this.a*(1-this.eccSquared)/(1-this.eccSquared*Math.sin(f)*Math.sin(f))**1.5,_=a/(p*.9996),v=f-p*Math.tan(f)/g*(_*_/2-(5+3*m+10*h-4*h*h-9*u)*_*_*_*_/24+(61+90*m+298*h+45*m*m-252*u-3*h*h)*_*_*_*_*_*_/720);v=this.toDegrees(v);var y=(_-(1+2*m+h)*_*_*_/6+(5-2*h+28*m-3*h*h+8*u+24*m*m)*_*_*_*_*_/120)/Math.cos(f);return y=l+this.toDegrees(y),{lat:v,lng:y}},n.getUtmLetterDesignator=function(e){return e=parseFloat(e),84>=e&&e>=72?`X`:72>e&&e>=64?`W`:64>e&&e>=56?`V`:56>e&&e>=48?`U`:48>e&&e>=40?`T`:40>e&&e>=32?`S`:32>e&&e>=24?`R`:24>e&&e>=16?`Q`:16>e&&e>=8?`P`:8>e&&e>=0?`N`:0>e&&e>=-8?`M`:-8>e&&e>=-16?`L`:-16>e&&e>=-24?`K`:-24>e&&e>=-32?`J`:-32>e&&e>=-40?`H`:-40>e&&e>=-48?`G`:-48>e&&e>=-56?`F`:-56>e&&e>=-64?`E`:-64>e&&e>=-72?`D`:-72>e&&e>=-80?`C`:`Z`},n.setEllipsoid=function(e){switch(e){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}},n.toDegrees=function(e){return e/Math.PI*180},n.toRadians=function(e){return e*Math.PI/180};function a(e,t){var n=10**t;return Math.round(e*n)/n}t.exports=i}))()),W8=class{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){let t=new U8.default;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`,e=>{let n=e.lngLat.lat,r=e.lngLat.lng,i=``,a=``,o=t.convertLatLngToUtm(n,r,2),s=n>0?`N`:`S`;this.options.utm&&(i=`ETRS89 UTM ${o.ZoneNumber}${s} X:<b> ${o.Easting}</b> Y:<b> ${o.Northing}</b> <br>`),this.options.lonlat&&(a=`WGS 84 Lon:<b> ${r.toFixed(5)}</b> Lat:<b> ${n.toFixed(5)}</b>`);let c=`${i}${a}`;this._container.innerHTML=c}),this._container}_lookUTM31(e,t){return e>=0&&e<=6&&t>=0&&t<=84}onRemove(){this._container.parentNode.removeChild(this._container),this._map=void 0}};function G8(e,t){return function(){return e.apply(t,arguments)}}var{toString:K8}=Object.prototype,{getPrototypeOf:q8}=Object,{iterator:J8,toStringTag:Y8}=Symbol,X8=(e=>t=>{let n=K8.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Z8=e=>(e=e.toLowerCase(),t=>X8(t)===e),Q8=e=>t=>typeof t===e,{isArray:$8}=Array,e5=Q8(`undefined`);function t5(e){return e!==null&&!e5(e)&&e.constructor!==null&&!e5(e.constructor)&&a5(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var n5=Z8(`ArrayBuffer`);function r5(e){let t;return t=typeof ArrayBuffer<`u`&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&n5(e.buffer),t}var i5=Q8(`string`),a5=Q8(`function`),o5=Q8(`number`),s5=e=>typeof e==`object`&&!!e,c5=e=>e===!0||e===!1,l5=e=>{if(X8(e)!==`object`)return!1;let t=q8(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Y8 in e)&&!(J8 in e)},u5=e=>{if(!s5(e)||t5(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},d5=Z8(`Date`),f5=Z8(`File`),p5=e=>!!(e&&e.uri!==void 0),m5=e=>e&&e.getParts!==void 0,h5=Z8(`Blob`),g5=Z8(`FileList`),_5=e=>s5(e)&&a5(e.pipe);function v5(){return typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:typeof global<`u`?global:{}}var y5=v5(),b5=y5.FormData===void 0?void 0:y5.FormData,x5=e=>{let t;return e&&(b5&&e instanceof b5||a5(e.append)&&((t=X8(e))===`formdata`||t===`object`&&a5(e.toString)&&e.toString()===`[object FormData]`))},S5=Z8(`URLSearchParams`),[C5,w5,T5,E5]=[`ReadableStream`,`Request`,`Response`,`Headers`].map(Z8),D5=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,``);function O5(e,t,{allOwnKeys:n=!1}={}){if(e==null)return;let r,i;if(typeof e!=`object`&&(e=[e]),$8(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{if(t5(e))return;let i=n?Object.getOwnPropertyNames(e):Object.keys(e),a=i.length,o;for(r=0;r<a;r++)o=i[r],t.call(null,e[o],o,e)}}function k5(e,t){if(t5(e))return null;t=t.toLowerCase();let n=Object.keys(e),r=n.length,i;for(;r-- >0;)if(i=n[r],t===i.toLowerCase())return i;return null}var A5=typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:global,j5=e=>!e5(e)&&e!==A5;function M5(){let{caseless:e,skipUndefined:t}=j5(this)&&this||{},n={},r=(r,i)=>{if(i===`__proto__`||i===`constructor`||i===`prototype`)return;let a=e&&k5(n,i)||i;l5(n[a])&&l5(r)?n[a]=M5(n[a],r):l5(r)?n[a]=M5({},r):$8(r)?n[a]=r.slice():(!t||!e5(r))&&(n[a]=r)};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&O5(arguments[e],r);return n}var N5=(e,t,n,{allOwnKeys:r}={})=>(O5(t,(t,r)=>{n&&a5(t)?Object.defineProperty(e,r,{value:G8(t,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,r,{value:t,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),P5=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),F5=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,`constructor`,{value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,`super`,{value:t.prototype}),n&&Object.assign(e.prototype,n)},I5=(e,t,n,r)=>{let i,a,o,s={};if(t||={},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),a=i.length;a-- >0;)o=i[a],(!r||r(o,e,t))&&!s[o]&&(t[o]=e[o],s[o]=!0);e=n!==!1&&q8(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},L5=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;let r=e.indexOf(t,n);return r!==-1&&r===n},R5=e=>{if(!e)return null;if($8(e))return e;let t=e.length;if(!o5(t))return null;let n=Array(t);for(;t-- >0;)n[t]=e[t];return n},z5=(e=>t=>e&&t instanceof e)(typeof Uint8Array<`u`&&q8(Uint8Array)),B5=(e,t)=>{let n=(e&&e[J8]).call(e),r;for(;(r=n.next())&&!r.done;){let n=r.value;t.call(e,n[0],n[1])}},V5=(e,t)=>{let n,r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},H5=Z8(`HTMLFormElement`),U5=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n}),W5=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),G5=Z8(`RegExp`),K5=(e,t)=>{let n=Object.getOwnPropertyDescriptors(e),r={};O5(n,(n,i)=>{let a;(a=t(n,i,e))!==!1&&(r[i]=a||n)}),Object.defineProperties(e,r)},q5=e=>{K5(e,(t,n)=>{if(a5(e)&&[`arguments`,`caller`,`callee`].indexOf(n)!==-1)return!1;let r=e[n];if(a5(r)){if(t.enumerable=!1,`writable`in t){t.writable=!1;return}t.set||=()=>{throw Error(`Can not rewrite read-only method '`+n+`'`)}}})},J5=(e,t)=>{let n={},r=e=>{e.forEach(e=>{n[e]=!0})};return $8(e)?r(e):r(String(e).split(t)),n},Y5=()=>{},X5=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Z5(e){return!!(e&&a5(e.append)&&e[Y8]===`FormData`&&e[J8])}var Q5=e=>{let t=Array(10),n=(e,r)=>{if(s5(e)){if(t.indexOf(e)>=0)return;if(t5(e))return e;if(!(`toJSON`in e)){t[r]=e;let i=$8(e)?[]:{};return O5(e,(e,t)=>{let a=n(e,r+1);!e5(a)&&(i[t]=a)}),t[r]=void 0,i}}return e};return n(e,0)},$5=Z8(`AsyncFunction`),e7=e=>e&&(s5(e)||a5(e))&&a5(e.then)&&a5(e.catch),t7=((e,t)=>e?setImmediate:t?((e,t)=>(A5.addEventListener(`message`,({source:n,data:r})=>{n===A5&&r===e&&t.length&&t.shift()()},!1),n=>{t.push(n),A5.postMessage(e,`*`)}))(`axios@${Math.random()}`,[]):e=>setTimeout(e))(typeof setImmediate==`function`,a5(A5.postMessage)),$={isArray:$8,isArrayBuffer:n5,isBuffer:t5,isFormData:x5,isArrayBufferView:r5,isString:i5,isNumber:o5,isBoolean:c5,isObject:s5,isPlainObject:l5,isEmptyObject:u5,isReadableStream:C5,isRequest:w5,isResponse:T5,isHeaders:E5,isUndefined:e5,isDate:d5,isFile:f5,isReactNativeBlob:p5,isReactNative:m5,isBlob:h5,isRegExp:G5,isFunction:a5,isStream:_5,isURLSearchParams:S5,isTypedArray:z5,isFileList:g5,forEach:O5,merge:M5,extend:N5,trim:D5,stripBOM:P5,inherits:F5,toFlatObject:I5,kindOf:X8,kindOfTest:Z8,endsWith:L5,toArray:R5,forEachEntry:B5,matchAll:V5,isHTMLForm:H5,hasOwnProperty:W5,hasOwnProp:W5,reduceDescriptors:K5,freezeMethods:q5,toObjectSet:J5,toCamelCase:U5,noop:Y5,toFiniteNumber:X5,findKey:k5,global:A5,isContextDefined:j5,isSpecCompliantForm:Z5,toJSONObject:Q5,isAsyncFn:$5,isThenable:e7,setImmediate:t7,asap:typeof queueMicrotask<`u`?queueMicrotask.bind(A5):typeof process<`u`&&process.nextTick||t7,isIterable:e=>e!=null&&a5(e[J8])},n7=class e extends Error{static from(t,n,r,i,a,o){let s=new e(t.message,n||t.code,r,i,a);return s.cause=t,s.name=t.name,t.status!=null&&s.status==null&&(s.status=t.status),o&&Object.assign(s,o),s}constructor(e,t,n,r,i){super(e),Object.defineProperty(this,`message`,{value:e,enumerable:!0,writable:!0,configurable:!0}),this.name=`AxiosError`,this.isAxiosError=!0,t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:$.toJSONObject(this.config),code:this.code,status:this.status}}};n7.ERR_BAD_OPTION_VALUE=`ERR_BAD_OPTION_VALUE`,n7.ERR_BAD_OPTION=`ERR_BAD_OPTION`,n7.ECONNABORTED=`ECONNABORTED`,n7.ETIMEDOUT=`ETIMEDOUT`,n7.ERR_NETWORK=`ERR_NETWORK`,n7.ERR_FR_TOO_MANY_REDIRECTS=`ERR_FR_TOO_MANY_REDIRECTS`,n7.ERR_DEPRECATED=`ERR_DEPRECATED`,n7.ERR_BAD_RESPONSE=`ERR_BAD_RESPONSE`,n7.ERR_BAD_REQUEST=`ERR_BAD_REQUEST`,n7.ERR_CANCELED=`ERR_CANCELED`,n7.ERR_NOT_SUPPORT=`ERR_NOT_SUPPORT`,n7.ERR_INVALID_URL=`ERR_INVALID_URL`;function r7(e){return $.isPlainObject(e)||$.isArray(e)}function i7(e){return $.endsWith(e,`[]`)?e.slice(0,-2):e}function a7(e,t,n){return e?e.concat(t).map(function(e,t){return e=i7(e),!n&&t?`[`+e+`]`:e}).join(n?`.`:``):t}function o7(e){return $.isArray(e)&&!e.some(r7)}var s7=$.toFlatObject($,{},null,function(e){return/^is[A-Z]/.test(e)});function c7(e,t,n){if(!$.isObject(e))throw TypeError(`target must be an object`);t||=new FormData,n=$.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!$.isUndefined(t[e])});let r=n.metaTokens,i=n.visitor||l,a=n.dots,o=n.indexes,s=(n.Blob||typeof Blob<`u`&&Blob)&&$.isSpecCompliantForm(t);if(!$.isFunction(i))throw TypeError(`visitor must be a function`);function c(e){if(e===null)return``;if($.isDate(e))return e.toISOString();if($.isBoolean(e))return e.toString();if(!s&&$.isBlob(e))throw new n7(`Blob is not supported. Use a Buffer instead.`);return $.isArrayBuffer(e)||$.isTypedArray(e)?s&&typeof Blob==`function`?new Blob([e]):Buffer.from(e):e}function l(e,n,i){let s=e;if($.isReactNative(t)&&$.isReactNativeBlob(e))return t.append(a7(i,n,a),c(e)),!1;if(e&&!i&&typeof e==`object`){if($.endsWith(n,`{}`))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if($.isArray(e)&&o7(e)||($.isFileList(e)||$.endsWith(n,`[]`))&&(s=$.toArray(e)))return n=i7(n),s.forEach(function(e,r){!($.isUndefined(e)||e===null)&&t.append(o===!0?a7([n],r,a):o===null?n:n+`[]`,c(e))}),!1}return r7(e)?!0:(t.append(a7(i,n,a),c(e)),!1)}let u=[],d=Object.assign(s7,{defaultVisitor:l,convertValue:c,isVisitable:r7});function f(e,n){if(!$.isUndefined(e)){if(u.indexOf(e)!==-1)throw Error(`Circular reference detected in `+n.join(`.`));u.push(e),$.forEach(e,function(e,r){(!($.isUndefined(e)||e===null)&&i.call(t,e,$.isString(r)?r.trim():r,n,d))===!0&&f(e,n?n.concat(r):[r])}),u.pop()}}if(!$.isObject(e))throw TypeError(`data must be an object`);return f(e),t}function l7(e){let t={"!":`%21`,"'":`%27`,"(":`%28`,")":`%29`,"~":`%7E`,"%20":`+`,"%00":`\0`};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function u7(e,t){this._pairs=[],e&&c7(e,this,t)}var d7=u7.prototype;d7.append=function(e,t){this._pairs.push([e,t])},d7.toString=function(e){let t=e?function(t){return e.call(this,t,l7)}:l7;return this._pairs.map(function(e){return t(e[0])+`=`+t(e[1])},``).join(`&`)};function f7(e){return encodeURIComponent(e).replace(/%3A/gi,`:`).replace(/%24/g,`$`).replace(/%2C/gi,`,`).replace(/%20/g,`+`)}function p7(e,t,n){if(!t)return e;let r=n&&n.encode||f7,i=$.isFunction(n)?{serialize:n}:n,a=i&&i.serialize,o;if(o=a?a(t,i):$.isURLSearchParams(t)?t.toString():new u7(t,i).toString(r),o){let t=e.indexOf(`#`);t!==-1&&(e=e.slice(0,t)),e+=(e.indexOf(`?`)===-1?`?`:`&`)+o}return e}var m7=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&=[]}forEach(e){$.forEach(this.handlers,function(t){t!==null&&e(t)})}},h7={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},g7={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<`u`?URLSearchParams:u7,FormData:typeof FormData<`u`?FormData:null,Blob:typeof Blob<`u`?Blob:null},protocols:[`http`,`https`,`file`,`blob`,`url`,`data`]},_7=l({hasBrowserEnv:()=>v7,hasStandardBrowserEnv:()=>b7,hasStandardBrowserWebWorkerEnv:()=>x7,navigator:()=>y7,origin:()=>S7}),v7=typeof window<`u`&&typeof document<`u`,y7=typeof navigator==`object`&&navigator||void 0,b7=v7&&(!y7||[`ReactNative`,`NativeScript`,`NS`].indexOf(y7.product)<0),x7=typeof WorkerGlobalScope<`u`&&self instanceof WorkerGlobalScope&&typeof self.importScripts==`function`,S7=v7&&window.location.href||`http://localhost`,C7={..._7,...g7};function w7(e,t){return c7(e,new C7.classes.URLSearchParams,{visitor:function(e,t,n,r){return C7.isNode&&$.isBuffer(e)?(this.append(t,e.toString(`base64`)),!1):r.defaultVisitor.apply(this,arguments)},...t})}function T7(e){return $.matchAll(/\w+|\[(\w*)]/g,e).map(e=>e[0]===`[]`?``:e[1]||e[0])}function E7(e){let t={},n=Object.keys(e),r,i=n.length,a;for(r=0;r<i;r++)a=n[r],t[a]=e[a];return t}function D7(e){function t(e,n,r,i){let a=e[i++];if(a===`__proto__`)return!0;let o=Number.isFinite(+a),s=i>=e.length;return a=!a&&$.isArray(r)?r.length:a,s?($.hasOwnProp(r,a)?r[a]=[r[a],n]:r[a]=n,!o):((!r[a]||!$.isObject(r[a]))&&(r[a]=[]),t(e,n,r[a],i)&&$.isArray(r[a])&&(r[a]=E7(r[a])),!o)}if($.isFormData(e)&&$.isFunction(e.entries)){let n={};return $.forEachEntry(e,(e,r)=>{t(T7(e),r,n,0)}),n}return null}function O7(e,t,n){if($.isString(e))try{return(t||JSON.parse)(e),$.trim(e)}catch(e){if(e.name!==`SyntaxError`)throw e}return(n||JSON.stringify)(e)}var k7={transitional:h7,adapter:[`xhr`,`http`,`fetch`],transformRequest:[function(e,t){let n=t.getContentType()||``,r=n.indexOf(`application/json`)>-1,i=$.isObject(e);if(i&&$.isHTMLForm(e)&&(e=new FormData(e)),$.isFormData(e))return r?JSON.stringify(D7(e)):e;if($.isArrayBuffer(e)||$.isBuffer(e)||$.isStream(e)||$.isFile(e)||$.isBlob(e)||$.isReadableStream(e))return e;if($.isArrayBufferView(e))return e.buffer;if($.isURLSearchParams(e))return t.setContentType(`application/x-www-form-urlencoded;charset=utf-8`,!1),e.toString();let a;if(i){if(n.indexOf(`application/x-www-form-urlencoded`)>-1)return w7(e,this.formSerializer).toString();if((a=$.isFileList(e))||n.indexOf(`multipart/form-data`)>-1){let t=this.env&&this.env.FormData;return c7(a?{"files[]":e}:e,t&&new t,this.formSerializer)}}return i||r?(t.setContentType(`application/json`,!1),O7(e)):e}],transformResponse:[function(e){let t=this.transitional||k7.transitional,n=t&&t.forcedJSONParsing,r=this.responseType===`json`;if($.isResponse(e)||$.isReadableStream(e))return e;if(e&&$.isString(e)&&(n&&!this.responseType||r)){let n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e,this.parseReviver)}catch(e){if(n)throw e.name===`SyntaxError`?n7.from(e,n7.ERR_BAD_RESPONSE,this,null,this.response):e}}return e}],timeout:0,xsrfCookieName:`XSRF-TOKEN`,xsrfHeaderName:`X-XSRF-TOKEN`,maxContentLength:-1,maxBodyLength:-1,env:{FormData:C7.classes.FormData,Blob:C7.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:`application/json, text/plain, */*`,"Content-Type":void 0}}};$.forEach([`delete`,`get`,`head`,`post`,`put`,`patch`],e=>{k7.headers[e]={}});var A7=$.toObjectSet([`age`,`authorization`,`content-length`,`content-type`,`etag`,`expires`,`from`,`host`,`if-modified-since`,`if-unmodified-since`,`last-modified`,`location`,`max-forwards`,`proxy-authorization`,`referer`,`retry-after`,`user-agent`]),j7=e=>{let t={},n,r,i;return e&&e.split(`
|
|
5802
5802
|
`).forEach(function(e){i=e.indexOf(`:`),n=e.substring(0,i).trim().toLowerCase(),r=e.substring(i+1).trim(),!(!n||t[n]&&A7[n])&&(n===`set-cookie`?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+`, `+r:r)}),t},M7=Symbol(`internals`),N7=e=>!/[\r\n]/.test(e);function P7(e,t){if(!(e===!1||e==null)){if($.isArray(e)){e.forEach(e=>P7(e,t));return}if(!N7(String(e)))throw Error(`Invalid character in header content ["${t}"]`)}}function F7(e){return e&&String(e).trim().toLowerCase()}function I7(e){let t=e.length;for(;t>0;){let n=e.charCodeAt(t-1);if(n!==10&&n!==13)break;--t}return t===e.length?e:e.slice(0,t)}function L7(e){return e===!1||e==null?e:$.isArray(e)?e.map(L7):I7(String(e))}function R7(e){let t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}var z7=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function B7(e,t,n,r,i){if($.isFunction(r))return r.call(this,t,n);if(i&&(t=n),$.isString(t)){if($.isString(r))return t.indexOf(r)!==-1;if($.isRegExp(r))return r.test(t)}}function V7(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}function H7(e,t){let n=$.toCamelCase(` `+t);[`get`,`set`,`has`].forEach(r=>{Object.defineProperty(e,r+n,{value:function(e,n,i){return this[r].call(this,t,e,n,i)},configurable:!0})})}var U7=class{constructor(e){e&&this.set(e)}set(e,t,n){let r=this;function i(e,t,n){let i=F7(t);if(!i)throw Error(`header name must be a non-empty string`);let a=$.findKey(r,i);(!a||r[a]===void 0||n===!0||n===void 0&&r[a]!==!1)&&(P7(e,t),r[a||t]=L7(e))}let a=(e,t)=>$.forEach(e,(e,n)=>i(e,n,t));if($.isPlainObject(e)||e instanceof this.constructor)a(e,t);else if($.isString(e)&&(e=e.trim())&&!z7(e))a(j7(e),t);else if($.isObject(e)&&$.isIterable(e)){let n={},r,i;for(let t of e){if(!$.isArray(t))throw TypeError(`Object iterator must return a key-value pair`);n[i=t[0]]=(r=n[i])?$.isArray(r)?[...r,t[1]]:[r,t[1]]:t[1]}a(n,t)}else e!=null&&i(t,e,n);return this}get(e,t){if(e=F7(e),e){let n=$.findKey(this,e);if(n){let e=this[n];if(!t)return e;if(t===!0)return R7(e);if($.isFunction(t))return t.call(this,e,n);if($.isRegExp(t))return t.exec(e);throw TypeError(`parser must be boolean|regexp|function`)}}}has(e,t){if(e=F7(e),e){let n=$.findKey(this,e);return!!(n&&this[n]!==void 0&&(!t||B7(this,this[n],n,t)))}return!1}delete(e,t){let n=this,r=!1;function i(e){if(e=F7(e),e){let i=$.findKey(n,e);i&&(!t||B7(n,n[i],i,t))&&(delete n[i],r=!0)}}return $.isArray(e)?e.forEach(i):i(e),r}clear(e){let t=Object.keys(this),n=t.length,r=!1;for(;n--;){let i=t[n];(!e||B7(this,this[i],i,e,!0))&&(delete this[i],r=!0)}return r}normalize(e){let t=this,n={};return $.forEach(this,(r,i)=>{let a=$.findKey(n,i);if(a){t[a]=L7(r),delete t[i];return}let o=e?V7(i):String(i).trim();o!==i&&delete t[i],t[o]=L7(r),n[o]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let t=Object.create(null);return $.forEach(this,(n,r)=>{n!=null&&n!==!1&&(t[r]=e&&$.isArray(n)?n.join(`, `):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+`: `+t).join(`
|
|
5803
5803
|
`)}getSetCookie(){return this.get(`set-cookie`)||[]}get[Symbol.toStringTag](){return`AxiosHeaders`}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){let n=new this(e);return t.forEach(e=>n.set(e)),n}static accessor(e){let t=(this[M7]=this[M7]={accessors:{}}).accessors,n=this.prototype;function r(e){let r=F7(e);t[r]||(H7(n,e),t[r]=!0)}return $.isArray(e)?e.forEach(r):r(e),this}};U7.accessor([`Content-Type`,`Content-Length`,`Accept`,`Accept-Encoding`,`User-Agent`,`Authorization`]),$.reduceDescriptors(U7.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}),$.freezeMethods(U7);function W7(e,t){let n=this||k7,r=t||n,i=U7.from(r.headers),a=r.data;return $.forEach(e,function(e){a=e.call(n,a,i.normalize(),t?t.status:void 0)}),i.normalize(),a}function G7(e){return!!(e&&e.__CANCEL__)}var K7=class extends n7{constructor(e,t,n){super(e??`canceled`,n7.ERR_CANCELED,t,n),this.name=`CanceledError`,this.__CANCEL__=!0}};function q7(e,t,n){let r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new n7(`Request failed with status code `+n.status,[n7.ERR_BAD_REQUEST,n7.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function J7(e){let t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||``}function Y7(e,t){e||=10;let n=Array(e),r=Array(e),i=0,a=0,o;return t=t===void 0?1e3:t,function(s){let c=Date.now(),l=r[a];o||=c,n[i]=s,r[i]=c;let u=a,d=0;for(;u!==i;)d+=n[u++],u%=e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),c-o<t)return;let f=l&&c-l;return f?Math.round(d*1e3/f):void 0}}function X7(e,t){let n=0,r=1e3/t,i,a,o=(t,r=Date.now())=>{n=r,i=null,a&&=(clearTimeout(a),null),e(...t)};return[(...e)=>{let t=Date.now(),s=t-n;s>=r?o(e,t):(i=e,a||=setTimeout(()=>{a=null,o(i)},r-s))},()=>i&&o(i)]}var Z7=(e,t,n=3)=>{let r=0,i=Y7(50,250);return X7(n=>{let a=n.loaded,o=n.lengthComputable?n.total:void 0,s=a-r,c=i(s),l=a<=o;r=a,e({loaded:a,total:o,progress:o?a/o:void 0,bytes:s,rate:c||void 0,estimated:c&&o&&l?(o-a)/c:void 0,event:n,lengthComputable:o!=null,[t?`download`:`upload`]:!0})},n)},Q7=(e,t)=>{let n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},$7=e=>(...t)=>$.asap(()=>e(...t)),e9=C7.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,C7.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(C7.origin),C7.navigator&&/(msie|trident)/i.test(C7.navigator.userAgent)):()=>!0,t9=C7.hasStandardBrowserEnv?{write(e,t,n,r,i,a,o){if(typeof document>`u`)return;let s=[`${e}=${encodeURIComponent(t)}`];$.isNumber(n)&&s.push(`expires=${new Date(n).toUTCString()}`),$.isString(r)&&s.push(`path=${r}`),$.isString(i)&&s.push(`domain=${i}`),a===!0&&s.push(`secure`),$.isString(o)&&s.push(`SameSite=${o}`),document.cookie=s.join(`; `)},read(e){if(typeof document>`u`)return null;let t=document.cookie.match(RegExp(`(?:^|; )`+e+`=([^;]*)`));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,``,Date.now()-864e5,`/`)}}:{write(){},read(){return null},remove(){}};function n9(e){return typeof e==`string`?/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e):!1}function r9(e,t){return t?e.replace(/\/?\/$/,``)+`/`+t.replace(/^\/+/,``):e}function i9(e,t,n){let r=!n9(t);return e&&(r||n==0)?r9(e,t):t}var a9=e=>e instanceof U7?{...e}:e;function o9(e,t){t||={};let n={};function r(e,t,n,r){return $.isPlainObject(e)&&$.isPlainObject(t)?$.merge.call({caseless:r},e,t):$.isPlainObject(t)?$.merge({},t):$.isArray(t)?t.slice():t}function i(e,t,n,i){if(!$.isUndefined(t))return r(e,t,n,i);if(!$.isUndefined(e))return r(void 0,e,n,i)}function a(e,t){if(!$.isUndefined(t))return r(void 0,t)}function o(e,t){if(!$.isUndefined(t))return r(void 0,t);if(!$.isUndefined(e))return r(void 0,e)}function s(n,i,a){if(a in t)return r(n,i);if(a in e)return r(void 0,n)}let c={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:s,headers:(e,t,n)=>i(a9(e),a9(t),n,!0)};return $.forEach(Object.keys({...e,...t}),function(r){if(r===`__proto__`||r===`constructor`||r===`prototype`)return;let a=$.hasOwnProp(c,r)?c[r]:i,o=a(e[r],t[r],r);$.isUndefined(o)&&a!==s||(n[r]=o)}),n}var s9=e=>{let t=o9({},e),{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:a,headers:o,auth:s}=t;if(t.headers=o=U7.from(o),t.url=p7(i9(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),s&&o.set(`Authorization`,`Basic `+btoa((s.username||``)+`:`+(s.password?unescape(encodeURIComponent(s.password)):``))),$.isFormData(n)){if(C7.hasStandardBrowserEnv||C7.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if($.isFunction(n.getHeaders)){let e=n.getHeaders(),t=[`content-type`,`content-length`];Object.entries(e).forEach(([e,n])=>{t.includes(e.toLowerCase())&&o.set(e,n)})}}if(C7.hasStandardBrowserEnv&&(r&&$.isFunction(r)&&(r=r(t)),r||r!==!1&&e9(t.url))){let e=i&&a&&t9.read(a);e&&o.set(i,e)}return t},c9=typeof XMLHttpRequest<`u`&&function(e){return new Promise(function(t,n){let r=s9(e),i=r.data,a=U7.from(r.headers).normalize(),{responseType:o,onUploadProgress:s,onDownloadProgress:c}=r,l,u,d,f,p;function m(){f&&f(),p&&p(),r.cancelToken&&r.cancelToken.unsubscribe(l),r.signal&&r.signal.removeEventListener(`abort`,l)}let h=new XMLHttpRequest;h.open(r.method.toUpperCase(),r.url,!0),h.timeout=r.timeout;function g(){if(!h)return;let r=U7.from(`getAllResponseHeaders`in h&&h.getAllResponseHeaders());q7(function(e){t(e),m()},function(e){n(e),m()},{data:!o||o===`text`||o===`json`?h.responseText:h.response,status:h.status,statusText:h.statusText,headers:r,config:e,request:h}),h=null}`onloadend`in h?h.onloadend=g:h.onreadystatechange=function(){!h||h.readyState!==4||h.status===0&&!(h.responseURL&&h.responseURL.indexOf(`file:`)===0)||setTimeout(g)},h.onabort=function(){h&&=(n(new n7(`Request aborted`,n7.ECONNABORTED,e,h)),null)},h.onerror=function(t){let r=new n7(t&&t.message?t.message:`Network Error`,n7.ERR_NETWORK,e,h);r.event=t||null,n(r),h=null},h.ontimeout=function(){let t=r.timeout?`timeout of `+r.timeout+`ms exceeded`:`timeout exceeded`,i=r.transitional||h7;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new n7(t,i.clarifyTimeoutError?n7.ETIMEDOUT:n7.ECONNABORTED,e,h)),h=null},i===void 0&&a.setContentType(null),`setRequestHeader`in h&&$.forEach(a.toJSON(),function(e,t){h.setRequestHeader(t,e)}),$.isUndefined(r.withCredentials)||(h.withCredentials=!!r.withCredentials),o&&o!==`json`&&(h.responseType=r.responseType),c&&([d,p]=Z7(c,!0),h.addEventListener(`progress`,d)),s&&h.upload&&([u,f]=Z7(s),h.upload.addEventListener(`progress`,u),h.upload.addEventListener(`loadend`,f)),(r.cancelToken||r.signal)&&(l=t=>{h&&=(n(!t||t.type?new K7(null,e,h):t),h.abort(),null)},r.cancelToken&&r.cancelToken.subscribe(l),r.signal&&(r.signal.aborted?l():r.signal.addEventListener(`abort`,l)));let _=J7(r.url);if(_&&C7.protocols.indexOf(_)===-1){n(new n7(`Unsupported protocol `+_+`:`,n7.ERR_BAD_REQUEST,e));return}h.send(i||null)})},l9=(e,t)=>{let{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n=new AbortController,r,i=function(e){if(!r){r=!0,o();let t=e instanceof Error?e:this.reason;n.abort(t instanceof n7?t:new K7(t instanceof Error?t.message:t))}},a=t&&setTimeout(()=>{a=null,i(new n7(`timeout of ${t}ms exceeded`,n7.ETIMEDOUT))},t),o=()=>{e&&=(a&&clearTimeout(a),a=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(i):e.removeEventListener(`abort`,i)}),null)};e.forEach(e=>e.addEventListener(`abort`,i));let{signal:s}=n;return s.unsubscribe=()=>$.asap(o),s}},u9=function*(e,t){let n=e.byteLength;if(!t||n<t){yield e;return}let r=0,i;for(;r<n;)i=r+t,yield e.slice(r,i),r=i},d9=async function*(e,t){for await(let n of f9(e))yield*u9(n,t)},f9=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}let t=e.getReader();try{for(;;){let{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}},p9=(e,t,n,r)=>{let i=d9(e,t),a=0,o,s=e=>{o||(o=!0,r&&r(e))};return new ReadableStream({async pull(e){try{let{done:t,value:r}=await i.next();if(t){s(),e.close();return}let o=r.byteLength;n&&n(a+=o),e.enqueue(new Uint8Array(r))}catch(e){throw s(e),e}},cancel(e){return s(e),i.return()}},{highWaterMark:2})},m9=64*1024,{isFunction:h9}=$,g9=(({Request:e,Response:t})=>({Request:e,Response:t}))($.global),{ReadableStream:_9,TextEncoder:v9}=$.global,y9=(e,...t)=>{try{return!!e(...t)}catch{return!1}},b9=e=>{e=$.merge.call({skipUndefined:!0},g9,e);let{fetch:t,Request:n,Response:r}=e,i=t?h9(t):typeof fetch==`function`,a=h9(n),o=h9(r);if(!i)return!1;let s=i&&h9(_9),c=i&&(typeof v9==`function`?(e=>t=>e.encode(t))(new v9):async e=>new Uint8Array(await new n(e).arrayBuffer())),l=a&&s&&y9(()=>{let e=!1,t=new _9,r=new n(C7.origin,{body:t,method:`POST`,get duplex(){return e=!0,`half`}}).headers.has(`Content-Type`);return t.cancel(),e&&!r}),u=o&&s&&y9(()=>$.isReadableStream(new r(``).body)),d={stream:u&&(e=>e.body)};i&&[`text`,`arrayBuffer`,`blob`,`formData`,`stream`].forEach(e=>{!d[e]&&(d[e]=(t,n)=>{let r=t&&t[e];if(r)return r.call(t);throw new n7(`Response type '${e}' is not supported`,n7.ERR_NOT_SUPPORT,n)})});let f=async e=>{if(e==null)return 0;if($.isBlob(e))return e.size;if($.isSpecCompliantForm(e))return(await new n(C7.origin,{method:`POST`,body:e}).arrayBuffer()).byteLength;if($.isArrayBufferView(e)||$.isArrayBuffer(e))return e.byteLength;if($.isURLSearchParams(e)&&(e+=``),$.isString(e))return(await c(e)).byteLength},p=async(e,t)=>$.toFiniteNumber(e.getContentLength())??f(t);return async e=>{let{url:i,method:o,data:s,signal:c,cancelToken:f,timeout:m,onDownloadProgress:h,onUploadProgress:g,responseType:_,headers:v,withCredentials:y=`same-origin`,fetchOptions:b}=s9(e),x=t||fetch;_=_?(_+``).toLowerCase():`text`;let S=l9([c,f&&f.toAbortSignal()],m),C=null,w=S&&S.unsubscribe&&(()=>{S.unsubscribe()}),T;try{if(g&&l&&o!==`get`&&o!==`head`&&(T=await p(v,s))!==0){let e=new n(i,{method:`POST`,body:s,duplex:`half`}),t;if($.isFormData(s)&&(t=e.headers.get(`content-type`))&&v.setContentType(t),e.body){let[t,n]=Q7(T,Z7($7(g)));s=p9(e.body,m9,t,n)}}$.isString(y)||(y=y?`include`:`omit`);let t=a&&`credentials`in n.prototype,c={...b,signal:S,method:o.toUpperCase(),headers:v.normalize().toJSON(),body:s,duplex:`half`,credentials:t?y:void 0};C=a&&new n(i,c);let f=await(a?x(C,b):x(i,c)),m=u&&(_===`stream`||_===`response`);if(u&&(h||m&&w)){let e={};[`status`,`statusText`,`headers`].forEach(t=>{e[t]=f[t]});let t=$.toFiniteNumber(f.headers.get(`content-length`)),[n,i]=h&&Q7(t,Z7($7(h),!0))||[];f=new r(p9(f.body,m9,n,()=>{i&&i(),w&&w()}),e)}_||=`text`;let E=await d[$.findKey(d,_)||`text`](f,e);return!m&&w&&w(),await new Promise((t,n)=>{q7(t,n,{data:E,headers:U7.from(f.headers),status:f.status,statusText:f.statusText,config:e,request:C})})}catch(t){throw w&&w(),t&&t.name===`TypeError`&&/Load failed|fetch/i.test(t.message)?Object.assign(new n7(`Network Error`,n7.ERR_NETWORK,e,C,t&&t.response),{cause:t.cause||t}):n7.from(t,t&&t.code,e,C,t&&t.response)}}},x9=new Map,S9=e=>{let t=e&&e.env||{},{fetch:n,Request:r,Response:i}=t,a=[r,i,n],o=a.length,s,c,l=x9;for(;o--;)s=a[o],c=l.get(s),c===void 0&&l.set(s,c=o?new Map:b9(t)),l=c;return c};S9();var C9={http:null,xhr:c9,fetch:{get:S9}};$.forEach(C9,(e,t)=>{if(e){try{Object.defineProperty(e,`name`,{value:t})}catch{}Object.defineProperty(e,`adapterName`,{value:t})}});var w9=e=>`- ${e}`,T9=e=>$.isFunction(e)||e===null||e===!1;function E9(e,t){e=$.isArray(e)?e:[e];let{length:n}=e,r,i,a={};for(let o=0;o<n;o++){r=e[o];let n;if(i=r,!T9(r)&&(i=C9[(n=String(r)).toLowerCase()],i===void 0))throw new n7(`Unknown adapter '${n}'`);if(i&&($.isFunction(i)||(i=i.get(t))))break;a[n||`#`+o]=i}if(!i){let e=Object.entries(a).map(([e,t])=>`adapter ${e} `+(t===!1?`is not supported by the environment`:`is not available in the build`));throw new n7(`There is no suitable adapter to dispatch the request `+(n?e.length>1?`since :
|
|
5804
5804
|
`+e.map(w9).join(`
|
|
@@ -5833,4 +5833,4 @@ end`};t.events.push([`putFont`,function(t){(function(t){var n=t.font,i=t.out,a=t
|
|
|
5833
5833
|
</div>
|
|
5834
5834
|
</div>
|
|
5835
5835
|
</div>
|
|
5836
|
-
`).addTo(this.map)}catch(e){return console.error(`Error adding popup: ${e.message}`),null}}addFullScreen(e){try{e===void 0&&(e=`top-right`),this.map.addControl(new f.default.FullscreenControl,e)}catch(e){console.error(`Error adding fullscreen control: ${e.message}`)}}addMenuItem(e){try{let t;if(t=e.includes(`-userFieldFilter-`)?e.split(`-userFieldFilter-`)[0]:e,e.length>0){let n=document.getElementById(`menu-group`),r=document.createElement(`input`);r.type=`checkbox`,r.id=e,r.checked=!0,n.appendChild(r);let i=document.createElement(`label`);i.setAttribute(`for`,e),i.textContent=t,n.appendChild(i),r.addEventListener(`change`,t=>{this.map.setLayoutProperty(e,`visibility`,t.target.checked?`visible`:`none`)})}}catch(e){console.error(`Error adding menu item: ${e.message}`)}}addLayerTree(e){try{let t=e.features,n=document.getElementById(`map`),r=document.createElement(`nav`);r.id=`filter-group`,n.appendChild(r);let i=document.getElementById(`filter-group`);this.map.addSource(`${e.id}`,{type:e.type,data:t}),t.features.forEach(t=>{let n=t.properties.icon,r=`poi-${n}`;if(!this.map.getLayer(r)){this.map.addLayer({id:r,type:`circle`,source:`${e.id}`,paint:{"circle-radius":6,"circle-color":`#B42222`},filter:[`==`,`icon`,n]},this._firstSymbolLayer());let t=document.createElement(`input`);t.type=`checkbox`,t.id=r,t.checked=!0,i.appendChild(t);let a=document.createElement(`label`);a.setAttribute(`for`,r),a.textContent=n,i.appendChild(a),t.addEventListener(`change`,e=>{this.map.setLayoutProperty(r,`visibility`,e.target.checked?`visible`:`none`)})}})}catch(e){console.error(`Error adding layer tree: ${e.message}`)}}createNavigationControl(e,t){try{t===void 0&&(t=`top-right`),this.map.addControl(new f.default.NavigationControl(e),t)}catch(e){return console.error(`Error creating navigation control: ${e.message}`),null}}addNavigationControl(e,t){try{t===void 0&&(t=`top-right`),this.map.addControl(new f.default.NavigationControl(e),t)}catch(e){console.error(`Error adding navigation control: ${e.message}`)}}addAttributionControl(e,t){try{let n=`<a style="font-weight: bold; color: #D97634;" href="https://www.icgc.cat/Eines-i-visors/Recursos-desenvolupadors/Biblioteca-MapICGC-GL-JS/" target="_blank">Fet amb MapICGC</a>`,r=Object.assign({},{compact:!0},e),i=r.autoCollapseDelay;delete r.autoCollapseDelay,r.customAttribution?Array.isArray(r.customAttribution)?r.customAttribution.includes(n)||(r.customAttribution=[n,...r.customAttribution]):r.customAttribution!==n&&(r.customAttribution=[n,r.customAttribution]):r.customAttribution=n,this.map.addControl(new f.default.AttributionControl(r),t),i&&typeof i==`number`&&i>0&&setTimeout(()=>{let e=document.querySelector(`.maplibregl-ctrl-attrib-button`);e&&e.getAttribute(`aria-pressed`)===`true`&&e.click()},i)}catch(e){console.error(`Error adding attribution control: ${e.message}`)}}addImageLayerICGC(e,t,n){try{let r=null,i;n?(i=n,n.layerPosition):i={type:`raster`,layout:{visibility:`visible`},paint:{"raster-opacity":1},layerPosition:J9},r=this._findImageType(e,Q9.Orto,Q9.VectorAdmin,Q9.WMS,Q9.Vector),r||console.log(`❌ %c The layer: %c%s%c does not exist in the ICGC DB. Consult the documentation.`,`font-weight: bold; font-style: italic;`,`font-weight: normal; font-style: normal; color: red;`,e,`font-weight: bold; font-style: italic;`),this.addLayerWMS(e,t,i)}catch(e){console.error(`Error adding ICGC image layer: ${e.message}`)}}async addVectorLayerICGC(e,t,n){try{let{type:r=`line`,layerPosition:i=J9,layoutOptions:a={visibility:`visible`},paintOption:o}=n||{},s=this._dealOrderLayer(i);if(!e){console.log(`❌ %c The layer: %c%s%c does not exist in the ICGC DB. Consult the documentation.`,`font-weight: bold; font-style: italic;`,`font-weight: normal; font-style: normal; color: red;`,e,`font-weight: bold; font-style: italic;`);return}if(e.includes(`https`)){let t=this._getKeyByUrlVector(e);this.map.addSource(t,{type:`vector`,url:e});let r={id:t,type:`fill`,source:t,"source-layer":`cobertes`,maxzoom:18,layout:n.layout,paint:K9.cobertesSol};if(t===`cobertes2018`&&this.map.addLayer(r,s),a.visibility===`visible`){let e=this._getLegendByName(t);this.addLegend(e,t)}}else{let i=t;this.map.addSource(i,{type:`vector`,url:$9.limitsUrl});let a={id:t,type:r,source:i,"source-layer":e,layout:n.layout,paint:n.paint||{}};r===`fill`||r===`polygon`?a.paint=o||{"fill-color":`#0000FF`,"fill-opacity":0}:r===`line`&&(a.paint=o||{"line-color":`#4832a8`,"line-opacity":1,"line-width":1}),this.map.addLayer(a,s)}}catch(e){console.error(`Error adding ICGC vector layer: ${e.message}`)}}async addFGBLayerICGC(e,t,n){try{n||(n.layout={visibility:!0},n.paint={"line-color":`#4832a8`,"line-opacity":1,"line-width":1},n.type=`lines`,n.layerPosition=`labels`);let r=this._dealOrderLayer(n.layerPosition),i=await fetch(e),a={type:`FeatureCollection`,features:[]};for await(let e of We(i.body))a.features.push(e);let o=t;this.map.addSource(o,{type:`geojson`,data:a}),e.includes(`text`)?this.map.addLayer({id:t,type:`symbol`,source:o,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:n.layout.visibility,"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)`}},r):this.map.addLayer({id:t,type:n.type,source:o,layout:n.layout,paint:n.paint},r)}catch(e){console.error(`Error adding ICGC FGB layer: ${e.message}`)}}addTerrainICGC(e,t){try{let n;for(let t in Z9)if(Z9.hasOwnProperty(t)){let r=Z9[t];r===e&&(n=r)}let r=n;this.getSource(`terrainICGC`)!==void 0&&(this.getStyle().layers.forEach(e=>{e.source===`terrainICGC`&&this.removeLayer(e.id)}),this.removeSource(`terrainICGC`)),this.getSource(`terrainICGC`)===void 0&&(e.includes(`terrarium`)?this.map.addSource(`terrainICGC`,{type:`raster-dem`,tiles:[r],tileSize:512,encoding:`terrarium`,maxzoom:16}):this.map.addSource(`terrainICGC`,{type:`raster-dem`,tiles:[r],tileSize:256,maxzoom:14,minzoom:7})),this.map.setTerrain({source:`terrainICGC`,exaggeration:1.5}),t==null||this.map.addControl(new Ge({pitch:90,bearing:null,minpitchzoom:null}),t)}catch(e){console.error(`Error adding 3D terrain: ${e.message}`)}}addLegend(e,t){try{this.map.addControl(new H8({url:e,idLayer:t}))}catch(e){console.error(`Error adding legend: ${e.message}`)}}_findImageType(e,t,n,r,i){let a=[t,n,r,i];for(let t of a)for(let[n,r]of Object.entries(t))if(r===e)return n;return null}_getKeyByUrlFGB(e){for(let t in Q9.FGBAdmin)if(Q9.FGBAdmin.hasOwnProperty(t)&&Q9.FGBAdmin[t]===e)return t;return null}_getLegendByName(e){for(let t in $9.vectorLayers){let n=$9.vectorLayers[t];if(n.key===e)return n.legend}return null}_getKeyByUrlVector(e){for(let t in Q9.Vector)if(Q9.Vector.hasOwnProperty(t)&&Q9.Vector[t]===e)return t;return null}async _raiseText3DStyle(){try{let e=await this.map.loadImage($9.map3dOptions.imageIcon);this.map.hasImage(`stick`)||this.map.addImage(`stick`,e.data),this.map.getStyle().layers.forEach(t=>{if(t[`source-layer`]===$9.map3dOptions.sourceLayerFilterId&&t.minzoom>=$9.map3dOptions.minZoomFilter&&e){let e=t.id;this.map.setLayoutProperty(e,`icon-image`,`stick`),this.map.setLayoutProperty(e,`text-offset`,[0,-9]),this.map.setLayoutProperty(e,`symbol-placement`,`point`),this.map.setLayoutProperty(e,`symbol-avoid-edges`,!1),this.map.setLayoutProperty(e,`text-allow-overlap`,!0),this.map.setLayoutProperty(e,`text-ignore-placement`,!1),this.map.setLayoutProperty(e,`text-pitch-alignment`,`auto`),this.map.setLayoutProperty(e,`text-rotation-alignment`,`auto`),this.map.setLayoutProperty(e,`text-justify`,`center`),this.map.setLayoutProperty(e,`text-anchor`,`bottom`),this.map.setLayoutProperty(e,`icon-anchor`,`bottom`),this.map.setPaintProperty(e,`text-color`,`#ffffff`),this.map.setPaintProperty(e,`text-halo-color`,`#000000`),this.map.setPaintProperty(e,`text-halo-width`,2)}})}catch(e){return console.error(`Error dealing orto 3D: ${e.message}`),null}}_dealStyleMaps(e){try{if(e&&e.indexOf(`icgc.cat`)!=-1){for(let t in X9)if(X9.hasOwnProperty(t)){let n=X9[t];if(t===e)return n}return X9[0]}else return e}catch(e){return console.error(`Error dealing with map styles: ${e.message}`),null}}_dealOrto3dStyle(e){try{if(e==`orto3d`){this.map.setMaxZoom(18.8),this.map.easeTo({pitch:45});let e=new qv({intensity:4});this.map.getTerrain()&&this.map.setTerrain(null),this.map.setTerrain({source:$9.map3dOptions.terrainSource,exaggeration:$9.map3dOptions.exaggeration});let t=new ly({ambientLight:e});Y9=new Bk({interleaved:!0,layers:[this._createCitiesMapboxLayer(!1)],effects:[t],onAfterRender:()=>{try{let e=this.map.getZoom()>=$9.map3dOptions.minZoomRange;Y9.setProps({layers:[this._createCitiesMapboxLayer(e)]})}catch{console.log(`No render 3D Mesh`)}}}),this.map.hasControl(Y9)||(this.map.addControl(Y9),this._raiseText3DStyle()),this.map.setSky({"sky-color":`#86bbd5`,"sky-horizon-blend":.3,"horizon-color":`#ffffff33`,"horizon-fog-blend":.1,"fog-ground-blend":.75,"fog-color":`#c5d6d6`}),this.map.on(`zoomend`,()=>{!this.map.getStyle().name==`orto3d`&&this.map.hasControl(Y9)&&(this.map.removeControl(Y9),Y9.setProps({layers:[]}),this.map.setTerrain(null))})}else Y9?.setProps({layers:[]}),this.map.hasControl(Y9)&&(this.map.removeControl(Y9),Y9.setProps({layers:[]}),this.map.setTerrain(null))}catch(e){return console.error(`Error dealing orto 3D: ${e.message}`),null}}_dealOrderLayer(e){return e===J9?this._firstSymbolLayer():e===q9?this._firstLineLayer():``}_firstSymbolLayer(){try{let e=this.map.getStyle().layers,t;for(let n=0;n<e.length;n++)if(e[n].type===`symbol`&&e[n].id.indexOf(`contour`)===-1&&e[n].id.indexOf(`water`)===-1){t=e[n].id;break}return t}catch(e){console.error(`Error getting first symbol layer: ${e.message}`)}}_firstLineLayer(){try{let e=this.map.getStyle().layers,t;for(let n=0;n<e.length;n++)if(e[n].type===`line`){t=e[n].id;break}return t}catch(e){console.error(`Error getting first symbol layer: ${e.message}`)}}_createCitiesMapboxLayer(e=!1){try{return new dU({id:$9.map3dOptions.layerId3d,data:$9.map3dOptions.urlTilesetCities,loader:iU,beforeId:$9.map3dOptions.layerIdOrder,visible:e,loadOptions:{tileset:{viewDistanceScale:1,memoryAdjustedScreenSpaceError:$9.map3dOptions.spaceErrorFactor,updateTransforms:!0,adjustScreenSpaceError:$9.map3dOptions.spaceErrorFactor}},onTilesetLoad:e=>{e.adjustScreenSpaceError=$9.map3dOptions.spaceErrorFactor,e.memoryAdjustedScreenSpaceError=$9.map3dOptions.spaceErrorFactor},onTileLoad:e=>{e.content.cartographicOrigin.z-=$9.map3dOptions.zfactor},operation:`terrain+draw`,pickable:!1})}catch(e){return console.error(`Error adding MapboxOverlay: ${e.message}`),null}}},fee=c(((e,t)=>{function n(e,t){var n=e.getCenter(),r=e.getZoom(),i=e.getBearing(),a=e.getPitch();t.forEach(function(e){e.jumpTo({center:n,zoom:r,bearing:i,pitch:a})})}function r(){var e,t=arguments.length;if(t===1)e=arguments[0];else{e=[];for(var r=0;r<t;r++)e.push(arguments[r])}var i=[];e.forEach(function(t,n){i[n]=s.bind(null,t,e.filter(function(e,t){return t!==n}))});function a(){e.forEach(function(e,t){e.on(`move`,i[t])})}function o(){e.forEach(function(e,t){e.off(`move`,i[t])})}function s(e,t){o(),n(e,t),a()}return a(),function(){o(),i=[],e=[]}}t.exports=r})),pee=c(((e,t)=>{var n=typeof Reflect==`object`?Reflect:null,r=n&&typeof n.apply==`function`?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)},i=n&&typeof n.ownKeys==`function`?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};function a(e){console&&console.warn&&console.warn(e)}var o=Number.isNaN||function(e){return e!==e};function s(){s.init.call(this)}t.exports=s,t.exports.once=y,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var c=10;function l(e){if(typeof e!=`function`)throw TypeError(`The "listener" argument must be of type Function. Received type `+typeof e)}Object.defineProperty(s,`defaultMaxListeners`,{enumerable:!0,get:function(){return c},set:function(e){if(typeof e!=`number`||e<0||o(e))throw RangeError(`The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received `+e+`.`);c=e}}),s.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},s.prototype.setMaxListeners=function(e){if(typeof e!=`number`||e<0||o(e))throw RangeError(`The value of "n" is out of range. It must be a non-negative number. Received `+e+`.`);return this._maxListeners=e,this};function u(e){return e._maxListeners===void 0?s.defaultMaxListeners:e._maxListeners}s.prototype.getMaxListeners=function(){return u(this)},s.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var i=e===`error`,a=this._events;if(a!==void 0)i&&=a.error===void 0;else if(!i)return!1;if(i){var o;if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var s=Error(`Unhandled error.`+(o?` (`+o.message+`)`:``));throw s.context=o,s}var c=a[e];if(c===void 0)return!1;if(typeof c==`function`)r(c,this,t);else for(var l=c.length,u=g(c,l),n=0;n<l;++n)r(u[n],this,t);return!0};function d(e,t,n,r){var i,o,s;if(l(n),o=e._events,o===void 0?(o=e._events=Object.create(null),e._eventsCount=0):(o.newListener!==void 0&&(e.emit(`newListener`,t,n.listener?n.listener:n),o=e._events),s=o[t]),s===void 0)s=o[t]=n,++e._eventsCount;else if(typeof s==`function`?s=o[t]=r?[n,s]:[s,n]:r?s.unshift(n):s.push(n),i=u(e),i>0&&s.length>i&&!s.warned){s.warned=!0;var c=Error(`Possible EventEmitter memory leak detected. `+s.length+` `+String(t)+` listeners added. Use emitter.setMaxListeners() to increase limit`);c.name=`MaxListenersExceededWarning`,c.emitter=e,c.type=t,c.count=s.length,a(c)}return e}s.prototype.addListener=function(e,t){return d(this,e,t,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(e,t){return d(this,e,t,!0)};function f(){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 p(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=f.bind(r);return i.listener=n,r.wrapFn=i,i}s.prototype.once=function(e,t){return l(t),this.on(e,p(this,e,t)),this},s.prototype.prependOnceListener=function(e,t){return l(t),this.prependListener(e,p(this,e,t)),this},s.prototype.removeListener=function(e,t){var n,r,i,a,o;if(l(t),r=this._events,r===void 0||(n=r[e],n===void 0))return this;if(n===t||n.listener===t)--this._eventsCount===0?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit(`removeListener`,e,n.listener||t));else if(typeof n!=`function`){for(i=-1,a=n.length-1;a>=0;a--)if(n[a]===t||n[a].listener===t){o=n[a].listener,i=a;break}if(i<0)return this;i===0?n.shift():_(n,i),n.length===1&&(r[e]=n[0]),r.removeListener!==void 0&&this.emit(`removeListener`,e,o||t)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(e){var t,n=this._events,r;if(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 i=Object.keys(n),a;for(r=0;r<i.length;++r)a=i[r],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(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this};function m(e,t,n){var r=e._events;if(r===void 0)return[];var i=r[t];return i===void 0?[]:typeof i==`function`?n?[i.listener||i]:[i]:n?v(i):g(i,i.length)}s.prototype.listeners=function(e){return m(this,e,!0)},s.prototype.rawListeners=function(e){return m(this,e,!1)},s.listenerCount=function(e,t){return typeof e.listenerCount==`function`?e.listenerCount(t):h.call(e,t)},s.prototype.listenerCount=h;function h(e){var t=this._events;if(t!==void 0){var n=t[e];if(typeof n==`function`)return 1;if(n!==void 0)return n.length}return 0}s.prototype.eventNames=function(){return this._eventsCount>0?i(this._events):[]};function g(e,t){for(var n=Array(t),r=0;r<t;++r)n[r]=e[r];return n}function _(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}function v(e){for(var t=Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}function y(e,t){return new Promise(function(n,r){function i(n){e.removeListener(t,a),r(n)}function a(){typeof e.removeListener==`function`&&e.removeListener(`error`,i),n([].slice.call(arguments))}x(e,t,a,{once:!0}),t!==`error`&&b(e,i,{once:!0})})}function b(e,t,n){typeof e.on==`function`&&x(e,`error`,t,n)}function x(e,t,n,r){if(typeof e.on==`function`)r.once?e.once(t,n):e.on(t,n);else if(typeof e.addEventListener==`function`)e.addEventListener(t,function i(a){r.once&&e.removeEventListener(t,i),n(a)});else throw TypeError(`The "emitter" argument must be of type EventEmitter. Received type `+typeof e)}})),mee=d(c(((e,t)=>{var n=fee(),r=pee().EventEmitter;function i(e,t,i,a){if(this.options=a||{},this._mapA=e,this._mapB=t,this._horizontal=this.options.orientation===`horizontal`,this._onDown=this._onDown.bind(this),this._onMove=this._onMove.bind(this),this._onMouseUp=this._onMouseUp.bind(this),this._onTouchEnd=this._onTouchEnd.bind(this),this._ev=new r,this._swiper=document.createElement(`div`),this._swiper.className=this._horizontal?`compare-swiper-horizontal`:`compare-swiper-vertical`,this._controlContainer=document.createElement(`div`),this._controlContainer.className=this._horizontal?`maplibregl-compare maplibregl-compare-horizontal`:`maplibregl-compare`,this._controlContainer.className=this._controlContainer.className,this._controlContainer.appendChild(this._swiper),typeof i==`string`&&document.body.querySelectorAll){var o=document.body.querySelectorAll(i)[0];if(!o)throw Error(`Cannot find element with specified container selector.`);o.appendChild(this._controlContainer)}else if(i instanceof Element&&i.appendChild)i.appendChild(this._controlContainer);else throw Error(`Invalid container specified. Must be CSS selector or HTML element.`);this._bounds=t.getContainer().getBoundingClientRect();var s=(this._horizontal?this._bounds.height:this._bounds.width)/2;this._setPosition(s),this._clearSync=n(e,t),this._onResize=function(){this._bounds=t.getContainer().getBoundingClientRect(),this.currentPosition&&this._setPosition(this.currentPosition)}.bind(this),t.on(`resize`,this._onResize),this.options&&this.options.mousemove&&(e.getContainer().addEventListener(`mousemove`,this._onMove),t.getContainer().addEventListener(`mousemove`,this._onMove)),this._swiper.addEventListener(`mousedown`,this._onDown),this._swiper.addEventListener(`touchstart`,this._onDown)}i.prototype={_setPointerEvents:function(e){this._controlContainer.style.pointerEvents=e,this._swiper.style.pointerEvents=e},_onDown:function(e){e.touches?(document.addEventListener(`touchmove`,this._onMove),document.addEventListener(`touchend`,this._onTouchEnd)):(document.addEventListener(`mousemove`,this._onMove),document.addEventListener(`mouseup`,this._onMouseUp))},_setPosition:function(e){e=Math.min(e,this._horizontal?this._bounds.height:this._bounds.width);var t=this._horizontal?`translate(0, `+e+`px)`:`translate(`+e+`px, 0)`;this._controlContainer.style.transform=t,this._controlContainer.style.WebkitTransform=t;var n=this._horizontal?`rect(0, 999em, `+e+`px, 0)`:`rect(0, `+e+`px, `+this._bounds.height+`px, 0)`,r=this._horizontal?`rect(`+e+`px, 999em, `+this._bounds.height+`px,0)`:`rect(0, 999em, `+this._bounds.height+`px,`+e+`px)`;this._mapA.getContainer().style.clip=n,this._mapB.getContainer().style.clip=r,this.currentPosition=e},_onMove:function(e){this.options&&this.options.mousemove&&this._setPointerEvents(e.touches?`auto`:`none`),this._horizontal?this._setPosition(this._getY(e)):this._setPosition(this._getX(e))},_onMouseUp:function(){document.removeEventListener(`mousemove`,this._onMove),document.removeEventListener(`mouseup`,this._onMouseUp),this.fire(`slideend`,{currentPosition:this.currentPosition})},_onTouchEnd:function(){document.removeEventListener(`touchmove`,this._onMove),document.removeEventListener(`touchend`,this._onTouchEnd),this.fire(`slideend`,{currentPosition:this.currentPosition})},_getX:function(e){e=e.touches?e.touches[0]:e;var t=e.clientX-this._bounds.left;return t<0&&(t=0),t>this._bounds.width&&(t=this._bounds.width),t},_getY:function(e){e=e.touches?e.touches[0]:e;var t=e.clientY-this._bounds.top;return t<0&&(t=0),t>this._bounds.height&&(t=this._bounds.height),t},setSlider:function(e){this._setPosition(e)},on:function(e,t){return this._ev.on(e,t),this},fire:function(e,t){return this._ev.emit(e,t),this},off:function(e,t){return this._ev.removeListener(e,t),this},remove:function(){this._clearSync(),this._mapB.off(`resize`,this._onResize);var e=this._mapA.getContainer();e&&(e.style.clip=null,e.removeEventListener(`mousemove`,this._onMove));var t=this._mapB.getContainer();t&&(t.style.clip=null,t.removeEventListener(`mousemove`,this._onMove)),this._swiper.removeEventListener(`mousedown`,this._onDown),this._swiper.removeEventListener(`touchstart`,this._onDown),this._controlContainer.remove()}},window.maplibregl?maplibregl.Compare=i:t!==void 0&&(t.exports=i)}))());e.CompareMaps=class{constructor(e,t,n,r){let i=this;setTimeout(function(){i.mapCompare=new mee.default(e.map,t.map,n,{}),i.collapseAttribution(e.map),i.collapseAttribution(t.map)},1e3)}collapseAttribution(e){let t=()=>{let n=e.getContainer().querySelector(`.maplibregl-ctrl-attrib-button`);n?n.click():requestAnimationFrame(t)};t()}},e.Config=G9,e.Map=dee});
|
|
5836
|
+
`).addTo(this.map)}catch(e){return console.error(`Error adding popup: ${e.message}`),null}}addFullScreen(e){try{e===void 0&&(e=`top-right`),this.map.addControl(new f.default.FullscreenControl,e)}catch(e){console.error(`Error adding fullscreen control: ${e.message}`)}}addMenuItem(e){try{let t;if(t=e.includes(`-userFieldFilter-`)?e.split(`-userFieldFilter-`)[0]:e,e.length>0){let n=document.getElementById(`menu-group`),r=document.createElement(`input`);r.type=`checkbox`,r.id=e,r.checked=!0,n.appendChild(r);let i=document.createElement(`label`);i.setAttribute(`for`,e),i.textContent=t,n.appendChild(i),r.addEventListener(`change`,t=>{this.map.setLayoutProperty(e,`visibility`,t.target.checked?`visible`:`none`)})}}catch(e){console.error(`Error adding menu item: ${e.message}`)}}addLayerTree(e){try{let t=e.features,n=document.getElementById(`map`),r=document.createElement(`nav`);r.id=`filter-group`,n.appendChild(r);let i=document.getElementById(`filter-group`);this.map.addSource(`${e.id}`,{type:e.type,data:t}),t.features.forEach(t=>{let n=t.properties.icon,r=`poi-${n}`;if(!this.map.getLayer(r)){this.map.addLayer({id:r,type:`circle`,source:`${e.id}`,paint:{"circle-radius":6,"circle-color":`#B42222`},filter:[`==`,`icon`,n]},this._firstSymbolLayer());let t=document.createElement(`input`);t.type=`checkbox`,t.id=r,t.checked=!0,i.appendChild(t);let a=document.createElement(`label`);a.setAttribute(`for`,r),a.textContent=n,i.appendChild(a),t.addEventListener(`change`,e=>{this.map.setLayoutProperty(r,`visibility`,e.target.checked?`visible`:`none`)})}})}catch(e){console.error(`Error adding layer tree: ${e.message}`)}}createNavigationControl(e,t){try{t===void 0&&(t=`top-right`),this.map.addControl(new f.default.NavigationControl(e),t)}catch(e){return console.error(`Error creating navigation control: ${e.message}`),null}}addNavigationControl(e,t){try{t===void 0&&(t=`top-right`),this.map.addControl(new f.default.NavigationControl(e),t)}catch(e){console.error(`Error adding navigation control: ${e.message}`)}}addAttributionControl(e,t){try{let n=`<a style="font-weight: bold; color: #D97634;" href="https://www.icgc.cat/Eines-i-visors/Recursos-desenvolupadors/Biblioteca-MapICGC-GL-JS/" target="_blank">Fet amb MapICGC</a>`,r=Object.assign({},{compact:!0},e),i=r.autoCollapseDelay;delete r.autoCollapseDelay,r.customAttribution?Array.isArray(r.customAttribution)?r.customAttribution.includes(n)||(r.customAttribution=[n,...r.customAttribution]):r.customAttribution!==n&&(r.customAttribution=[n,r.customAttribution]):r.customAttribution=n,this.map.addControl(new f.default.AttributionControl(r),t),i&&typeof i==`number`&&i>0&&setTimeout(()=>{let e=document.querySelector(`.maplibregl-ctrl-attrib-button`);e&&e.getAttribute(`aria-pressed`)===`true`&&e.click()},i)}catch(e){console.error(`Error adding attribution control: ${e.message}`)}}addImageLayerICGC(e,t,n){try{let r=null,i;n?(i=n,n.layerPosition):i={type:`raster`,layout:{visibility:`visible`},paint:{"raster-opacity":1},layerPosition:J9},r=this._findImageType(e,Q9.Orto,Q9.VectorAdmin,Q9.WMS,Q9.Vector),r||console.log(`❌ %c The layer: %c%s%c does not exist in the ICGC DB. Consult the documentation.`,`font-weight: bold; font-style: italic;`,`font-weight: normal; font-style: normal; color: red;`,e,`font-weight: bold; font-style: italic;`),this.addLayerWMS(e,t,i)}catch(e){console.error(`Error adding ICGC image layer: ${e.message}`)}}async addVectorLayerICGC(e,t,n){try{let{type:r=`line`,layerPosition:i=J9,layoutOptions:a={visibility:`visible`},paintOption:o}=n||{},s=this._dealOrderLayer(i);if(!e){console.log(`❌ %c The layer: %c%s%c does not exist in the ICGC DB. Consult the documentation.`,`font-weight: bold; font-style: italic;`,`font-weight: normal; font-style: normal; color: red;`,e,`font-weight: bold; font-style: italic;`);return}if(e.includes(`https`)){let t=this._getKeyByUrlVector(e);this.map.addSource(t,{type:`vector`,url:e});let r={id:t,type:`fill`,source:t,"source-layer":`cobertes`,maxzoom:18,layout:n.layout,paint:K9.cobertesSol};if(t===`cobertes2018`&&this.map.addLayer(r,s),a.visibility===`visible`){let e=this._getLegendByName(t);this.addLegend(e,t)}}else{let i=t;this.map.addSource(i,{type:`vector`,url:$9.limitsUrl});let a={id:t,type:r,source:i,"source-layer":e,layout:n.layout,paint:n.paint||{}};r===`fill`||r===`polygon`?a.paint=o||{"fill-color":`#0000FF`,"fill-opacity":0}:r===`line`&&(a.paint=o||{"line-color":`#4832a8`,"line-opacity":1,"line-width":1}),this.map.addLayer(a,s)}}catch(e){console.error(`Error adding ICGC vector layer: ${e.message}`)}}async addFGBLayerICGC(e,t,n){try{n||(n.layout={visibility:!0},n.paint={"line-color":`#4832a8`,"line-opacity":1,"line-width":1},n.type=`lines`,n.layerPosition=`labels`);let r=this._dealOrderLayer(n.layerPosition),i=await fetch(e),a={type:`FeatureCollection`,features:[]};for await(let e of We(i.body))a.features.push(e);let o=t;this.map.addSource(o,{type:`geojson`,data:a}),e.includes(`text`)?this.map.addLayer({id:t,type:`symbol`,source:o,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:n.layout.visibility,"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)`}},r):this.map.addLayer({id:t,type:n.type,source:o,layout:n.layout,paint:n.paint},r)}catch(e){console.error(`Error adding ICGC FGB layer: ${e.message}`)}}addTerrainICGC(e,t){try{let n=$9?.urlTerrainICGC||[],r=Array.isArray(n)?n:Object.values(n),i=null,a=typeof e==`string`?e.trim():``,o=a.toLowerCase();a&&(i=r.find(e=>e?.name?.toLowerCase?.()===o)||r.find(e=>e?.url===a));let s=i?.url;if(!s&&a){let e=Object.entries(Z9||{}).find(([e])=>e.toLowerCase()===o),t=Object.entries(Z9||{}).find(([,e])=>e===a);s=e?.[1]||t?.[1]||a}if(!s)throw Error(`Terrain URL not found in configuration`);if(this.getSource(`terrainICGC`)!==void 0&&(this.getStyle().layers.forEach(e=>{e.source===`terrainICGC`&&this.removeLayer(e.id)}),this.removeSource(`terrainICGC`)),this.getSource(`terrainICGC`)===void 0){let e=i?.name?.toLowerCase?.()||o,t={type:`raster-dem`,tiles:[s]};i?.encoding&&(t.encoding=i.encoding),i?.attribution&&(t.attribution=i.attribution),typeof i?.tileSize==`number`&&(t.tileSize=i.tileSize),typeof i?.maxzoom==`number`&&(t.maxzoom=i.maxzoom),typeof i?.minzoom==`number`&&(t.minzoom=i.minzoom),t.tileSize||(e===`world30m`?t.tileSize=512:e===`icgc5m`?t.tileSize=256:t.tileSize=t.encoding===`terrarium`?512:256),typeof t.maxzoom!=`number`&&(e===`world30m`?t.maxzoom=16:t.maxzoom=t.encoding===`terrarium`?16:14),t.encoding!==`terrarium`&&typeof t.minzoom!=`number`&&(t.minzoom=7),this.map.addSource(`terrainICGC`,t)}this.map.setTerrain({source:`terrainICGC`,exaggeration:1.5}),t==null||this.map.addControl(new Ge({pitch:90,bearing:null,minpitchzoom:null}),t)}catch(e){console.error(`Error adding 3D terrain: ${e.message}`)}}addLegend(e,t){try{this.map.addControl(new H8({url:e,idLayer:t}))}catch(e){console.error(`Error adding legend: ${e.message}`)}}_findImageType(e,t,n,r,i){let a=[t,n,r,i];for(let t of a)for(let[n,r]of Object.entries(t))if(r===e)return n;return null}_getKeyByUrlFGB(e){for(let t in Q9.FGBAdmin)if(Q9.FGBAdmin.hasOwnProperty(t)&&Q9.FGBAdmin[t]===e)return t;return null}_getLegendByName(e){for(let t in $9.vectorLayers){let n=$9.vectorLayers[t];if(n.key===e)return n.legend}return null}_getKeyByUrlVector(e){for(let t in Q9.Vector)if(Q9.Vector.hasOwnProperty(t)&&Q9.Vector[t]===e)return t;return null}async _raiseText3DStyle(){try{let e=await this.map.loadImage($9.map3dOptions.imageIcon);this.map.hasImage(`stick`)||this.map.addImage(`stick`,e.data),this.map.getStyle().layers.forEach(t=>{if(t[`source-layer`]===$9.map3dOptions.sourceLayerFilterId&&t.minzoom>=$9.map3dOptions.minZoomFilter&&e){let e=t.id;this.map.setLayoutProperty(e,`icon-image`,`stick`),this.map.setLayoutProperty(e,`text-offset`,[0,-9]),this.map.setLayoutProperty(e,`symbol-placement`,`point`),this.map.setLayoutProperty(e,`symbol-avoid-edges`,!1),this.map.setLayoutProperty(e,`text-allow-overlap`,!0),this.map.setLayoutProperty(e,`text-ignore-placement`,!1),this.map.setLayoutProperty(e,`text-pitch-alignment`,`auto`),this.map.setLayoutProperty(e,`text-rotation-alignment`,`auto`),this.map.setLayoutProperty(e,`text-justify`,`center`),this.map.setLayoutProperty(e,`text-anchor`,`bottom`),this.map.setLayoutProperty(e,`icon-anchor`,`bottom`),this.map.setPaintProperty(e,`text-color`,`#ffffff`),this.map.setPaintProperty(e,`text-halo-color`,`#000000`),this.map.setPaintProperty(e,`text-halo-width`,2)}})}catch(e){return console.error(`Error dealing orto 3D: ${e.message}`),null}}_dealStyleMaps(e){try{if(e&&e.indexOf(`icgc.cat`)!=-1){for(let t in X9)if(X9.hasOwnProperty(t)){let n=X9[t];if(t===e)return n}return X9[0]}else return e}catch(e){return console.error(`Error dealing with map styles: ${e.message}`),null}}_dealOrto3dStyle(e){try{if(e==`orto3d`){this.map.setMaxZoom(18.8),this.map.easeTo({pitch:45});let e=new qv({intensity:4});this.map.getTerrain()&&this.map.setTerrain(null),this.map.setTerrain({source:$9.map3dOptions.terrainSource,exaggeration:$9.map3dOptions.exaggeration});let t=new ly({ambientLight:e});Y9=new Bk({interleaved:!0,layers:[this._createCitiesMapboxLayer(!1)],effects:[t],onAfterRender:()=>{try{let e=this.map.getZoom()>=$9.map3dOptions.minZoomRange;Y9.setProps({layers:[this._createCitiesMapboxLayer(e)]})}catch{console.log(`No render 3D Mesh`)}}}),this.map.hasControl(Y9)||(this.map.addControl(Y9),this._raiseText3DStyle()),this.map.setSky({"sky-color":`#86bbd5`,"sky-horizon-blend":.3,"horizon-color":`#ffffff33`,"horizon-fog-blend":.1,"fog-ground-blend":.75,"fog-color":`#c5d6d6`}),this.map.on(`zoomend`,()=>{!this.map.getStyle().name==`orto3d`&&this.map.hasControl(Y9)&&(this.map.removeControl(Y9),Y9.setProps({layers:[]}),this.map.setTerrain(null))})}else Y9?.setProps({layers:[]}),this.map.hasControl(Y9)&&(this.map.removeControl(Y9),Y9.setProps({layers:[]}),this.map.setTerrain(null))}catch(e){return console.error(`Error dealing orto 3D: ${e.message}`),null}}_dealOrderLayer(e){return e===J9?this._firstSymbolLayer():e===q9?this._firstLineLayer():``}_firstSymbolLayer(){try{let e=this.map.getStyle().layers,t;for(let n=0;n<e.length;n++)if(e[n].type===`symbol`&&e[n].id.indexOf(`contour`)===-1&&e[n].id.indexOf(`water`)===-1){t=e[n].id;break}return t}catch(e){console.error(`Error getting first symbol layer: ${e.message}`)}}_firstLineLayer(){try{let e=this.map.getStyle().layers,t;for(let n=0;n<e.length;n++)if(e[n].type===`line`){t=e[n].id;break}return t}catch(e){console.error(`Error getting first symbol layer: ${e.message}`)}}_createCitiesMapboxLayer(e=!1){try{return new dU({id:$9.map3dOptions.layerId3d,data:$9.map3dOptions.urlTilesetCities,loader:iU,beforeId:$9.map3dOptions.layerIdOrder,visible:e,loadOptions:{tileset:{viewDistanceScale:1,memoryAdjustedScreenSpaceError:$9.map3dOptions.spaceErrorFactor,updateTransforms:!0,adjustScreenSpaceError:$9.map3dOptions.spaceErrorFactor}},onTilesetLoad:e=>{e.adjustScreenSpaceError=$9.map3dOptions.spaceErrorFactor,e.memoryAdjustedScreenSpaceError=$9.map3dOptions.spaceErrorFactor},onTileLoad:e=>{e.content.cartographicOrigin.z-=$9.map3dOptions.zfactor},operation:`terrain+draw`,pickable:!1})}catch(e){return console.error(`Error adding MapboxOverlay: ${e.message}`),null}}},fee=c(((e,t)=>{function n(e,t){var n=e.getCenter(),r=e.getZoom(),i=e.getBearing(),a=e.getPitch();t.forEach(function(e){e.jumpTo({center:n,zoom:r,bearing:i,pitch:a})})}function r(){var e,t=arguments.length;if(t===1)e=arguments[0];else{e=[];for(var r=0;r<t;r++)e.push(arguments[r])}var i=[];e.forEach(function(t,n){i[n]=s.bind(null,t,e.filter(function(e,t){return t!==n}))});function a(){e.forEach(function(e,t){e.on(`move`,i[t])})}function o(){e.forEach(function(e,t){e.off(`move`,i[t])})}function s(e,t){o(),n(e,t),a()}return a(),function(){o(),i=[],e=[]}}t.exports=r})),pee=c(((e,t)=>{var n=typeof Reflect==`object`?Reflect:null,r=n&&typeof n.apply==`function`?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)},i=n&&typeof n.ownKeys==`function`?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};function a(e){console&&console.warn&&console.warn(e)}var o=Number.isNaN||function(e){return e!==e};function s(){s.init.call(this)}t.exports=s,t.exports.once=y,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var c=10;function l(e){if(typeof e!=`function`)throw TypeError(`The "listener" argument must be of type Function. Received type `+typeof e)}Object.defineProperty(s,`defaultMaxListeners`,{enumerable:!0,get:function(){return c},set:function(e){if(typeof e!=`number`||e<0||o(e))throw RangeError(`The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received `+e+`.`);c=e}}),s.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},s.prototype.setMaxListeners=function(e){if(typeof e!=`number`||e<0||o(e))throw RangeError(`The value of "n" is out of range. It must be a non-negative number. Received `+e+`.`);return this._maxListeners=e,this};function u(e){return e._maxListeners===void 0?s.defaultMaxListeners:e._maxListeners}s.prototype.getMaxListeners=function(){return u(this)},s.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var i=e===`error`,a=this._events;if(a!==void 0)i&&=a.error===void 0;else if(!i)return!1;if(i){var o;if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var s=Error(`Unhandled error.`+(o?` (`+o.message+`)`:``));throw s.context=o,s}var c=a[e];if(c===void 0)return!1;if(typeof c==`function`)r(c,this,t);else for(var l=c.length,u=g(c,l),n=0;n<l;++n)r(u[n],this,t);return!0};function d(e,t,n,r){var i,o,s;if(l(n),o=e._events,o===void 0?(o=e._events=Object.create(null),e._eventsCount=0):(o.newListener!==void 0&&(e.emit(`newListener`,t,n.listener?n.listener:n),o=e._events),s=o[t]),s===void 0)s=o[t]=n,++e._eventsCount;else if(typeof s==`function`?s=o[t]=r?[n,s]:[s,n]:r?s.unshift(n):s.push(n),i=u(e),i>0&&s.length>i&&!s.warned){s.warned=!0;var c=Error(`Possible EventEmitter memory leak detected. `+s.length+` `+String(t)+` listeners added. Use emitter.setMaxListeners() to increase limit`);c.name=`MaxListenersExceededWarning`,c.emitter=e,c.type=t,c.count=s.length,a(c)}return e}s.prototype.addListener=function(e,t){return d(this,e,t,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(e,t){return d(this,e,t,!0)};function f(){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 p(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=f.bind(r);return i.listener=n,r.wrapFn=i,i}s.prototype.once=function(e,t){return l(t),this.on(e,p(this,e,t)),this},s.prototype.prependOnceListener=function(e,t){return l(t),this.prependListener(e,p(this,e,t)),this},s.prototype.removeListener=function(e,t){var n,r,i,a,o;if(l(t),r=this._events,r===void 0||(n=r[e],n===void 0))return this;if(n===t||n.listener===t)--this._eventsCount===0?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit(`removeListener`,e,n.listener||t));else if(typeof n!=`function`){for(i=-1,a=n.length-1;a>=0;a--)if(n[a]===t||n[a].listener===t){o=n[a].listener,i=a;break}if(i<0)return this;i===0?n.shift():_(n,i),n.length===1&&(r[e]=n[0]),r.removeListener!==void 0&&this.emit(`removeListener`,e,o||t)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(e){var t,n=this._events,r;if(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 i=Object.keys(n),a;for(r=0;r<i.length;++r)a=i[r],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(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this};function m(e,t,n){var r=e._events;if(r===void 0)return[];var i=r[t];return i===void 0?[]:typeof i==`function`?n?[i.listener||i]:[i]:n?v(i):g(i,i.length)}s.prototype.listeners=function(e){return m(this,e,!0)},s.prototype.rawListeners=function(e){return m(this,e,!1)},s.listenerCount=function(e,t){return typeof e.listenerCount==`function`?e.listenerCount(t):h.call(e,t)},s.prototype.listenerCount=h;function h(e){var t=this._events;if(t!==void 0){var n=t[e];if(typeof n==`function`)return 1;if(n!==void 0)return n.length}return 0}s.prototype.eventNames=function(){return this._eventsCount>0?i(this._events):[]};function g(e,t){for(var n=Array(t),r=0;r<t;++r)n[r]=e[r];return n}function _(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}function v(e){for(var t=Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}function y(e,t){return new Promise(function(n,r){function i(n){e.removeListener(t,a),r(n)}function a(){typeof e.removeListener==`function`&&e.removeListener(`error`,i),n([].slice.call(arguments))}x(e,t,a,{once:!0}),t!==`error`&&b(e,i,{once:!0})})}function b(e,t,n){typeof e.on==`function`&&x(e,`error`,t,n)}function x(e,t,n,r){if(typeof e.on==`function`)r.once?e.once(t,n):e.on(t,n);else if(typeof e.addEventListener==`function`)e.addEventListener(t,function i(a){r.once&&e.removeEventListener(t,i),n(a)});else throw TypeError(`The "emitter" argument must be of type EventEmitter. Received type `+typeof e)}})),mee=d(c(((e,t)=>{var n=fee(),r=pee().EventEmitter;function i(e,t,i,a){if(this.options=a||{},this._mapA=e,this._mapB=t,this._horizontal=this.options.orientation===`horizontal`,this._onDown=this._onDown.bind(this),this._onMove=this._onMove.bind(this),this._onMouseUp=this._onMouseUp.bind(this),this._onTouchEnd=this._onTouchEnd.bind(this),this._ev=new r,this._swiper=document.createElement(`div`),this._swiper.className=this._horizontal?`compare-swiper-horizontal`:`compare-swiper-vertical`,this._controlContainer=document.createElement(`div`),this._controlContainer.className=this._horizontal?`maplibregl-compare maplibregl-compare-horizontal`:`maplibregl-compare`,this._controlContainer.className=this._controlContainer.className,this._controlContainer.appendChild(this._swiper),typeof i==`string`&&document.body.querySelectorAll){var o=document.body.querySelectorAll(i)[0];if(!o)throw Error(`Cannot find element with specified container selector.`);o.appendChild(this._controlContainer)}else if(i instanceof Element&&i.appendChild)i.appendChild(this._controlContainer);else throw Error(`Invalid container specified. Must be CSS selector or HTML element.`);this._bounds=t.getContainer().getBoundingClientRect();var s=(this._horizontal?this._bounds.height:this._bounds.width)/2;this._setPosition(s),this._clearSync=n(e,t),this._onResize=function(){this._bounds=t.getContainer().getBoundingClientRect(),this.currentPosition&&this._setPosition(this.currentPosition)}.bind(this),t.on(`resize`,this._onResize),this.options&&this.options.mousemove&&(e.getContainer().addEventListener(`mousemove`,this._onMove),t.getContainer().addEventListener(`mousemove`,this._onMove)),this._swiper.addEventListener(`mousedown`,this._onDown),this._swiper.addEventListener(`touchstart`,this._onDown)}i.prototype={_setPointerEvents:function(e){this._controlContainer.style.pointerEvents=e,this._swiper.style.pointerEvents=e},_onDown:function(e){e.touches?(document.addEventListener(`touchmove`,this._onMove),document.addEventListener(`touchend`,this._onTouchEnd)):(document.addEventListener(`mousemove`,this._onMove),document.addEventListener(`mouseup`,this._onMouseUp))},_setPosition:function(e){e=Math.min(e,this._horizontal?this._bounds.height:this._bounds.width);var t=this._horizontal?`translate(0, `+e+`px)`:`translate(`+e+`px, 0)`;this._controlContainer.style.transform=t,this._controlContainer.style.WebkitTransform=t;var n=this._horizontal?`rect(0, 999em, `+e+`px, 0)`:`rect(0, `+e+`px, `+this._bounds.height+`px, 0)`,r=this._horizontal?`rect(`+e+`px, 999em, `+this._bounds.height+`px,0)`:`rect(0, 999em, `+this._bounds.height+`px,`+e+`px)`;this._mapA.getContainer().style.clip=n,this._mapB.getContainer().style.clip=r,this.currentPosition=e},_onMove:function(e){this.options&&this.options.mousemove&&this._setPointerEvents(e.touches?`auto`:`none`),this._horizontal?this._setPosition(this._getY(e)):this._setPosition(this._getX(e))},_onMouseUp:function(){document.removeEventListener(`mousemove`,this._onMove),document.removeEventListener(`mouseup`,this._onMouseUp),this.fire(`slideend`,{currentPosition:this.currentPosition})},_onTouchEnd:function(){document.removeEventListener(`touchmove`,this._onMove),document.removeEventListener(`touchend`,this._onTouchEnd),this.fire(`slideend`,{currentPosition:this.currentPosition})},_getX:function(e){e=e.touches?e.touches[0]:e;var t=e.clientX-this._bounds.left;return t<0&&(t=0),t>this._bounds.width&&(t=this._bounds.width),t},_getY:function(e){e=e.touches?e.touches[0]:e;var t=e.clientY-this._bounds.top;return t<0&&(t=0),t>this._bounds.height&&(t=this._bounds.height),t},setSlider:function(e){this._setPosition(e)},on:function(e,t){return this._ev.on(e,t),this},fire:function(e,t){return this._ev.emit(e,t),this},off:function(e,t){return this._ev.removeListener(e,t),this},remove:function(){this._clearSync(),this._mapB.off(`resize`,this._onResize);var e=this._mapA.getContainer();e&&(e.style.clip=null,e.removeEventListener(`mousemove`,this._onMove));var t=this._mapB.getContainer();t&&(t.style.clip=null,t.removeEventListener(`mousemove`,this._onMove)),this._swiper.removeEventListener(`mousedown`,this._onDown),this._swiper.removeEventListener(`touchstart`,this._onDown),this._controlContainer.remove()}},window.maplibregl?maplibregl.Compare=i:t!==void 0&&(t.exports=i)}))());e.CompareMaps=class{constructor(e,t,n,r){let i=this;setTimeout(function(){i.mapCompare=new mee.default(e.map,t.map,n,{}),i.collapseAttribution(e.map),i.collapseAttribution(t.map)},1e3)}collapseAttribution(e){let t=()=>{let n=e.getContainer().querySelector(`.maplibregl-ctrl-attrib-button`);n?n.click():requestAnimationFrame(t)};t()}},e.Config=G9,e.Map=dee});
|