diff --git a/dist/assets/index-DocyZ-tb.js b/dist/assets/index-DocyZ-tb.js
deleted file mode 100644
index 2792626..0000000
--- a/dist/assets/index-DocyZ-tb.js
+++ /dev/null
@@ -1,4 +0,0 @@
-(function(){const o=document.createElement("link").relList;if(o&&o.supports&&o.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))s(l);new MutationObserver(l=>{for(const n of l)if(n.type==="childList")for(const c of n.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&s(c)}).observe(document,{childList:!0,subtree:!0});function r(l){const n={};return l.integrity&&(n.integrity=l.integrity),l.referrerPolicy&&(n.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?n.credentials="include":l.crossOrigin==="anonymous"?n.credentials="omit":n.credentials="same-origin",n}function s(l){if(l.ep)return;l.ep=!0;const n=r(l);fetch(l.href,n)}})();var e,b;let A="",F=!0,h,g=null,M,S="#000000";const D={top:60,bottom:window.innerHeight*.5+25,left:60,right:60},R={top:100,bottom:100,left:300,right:50};async function G(){const o=document.getElementById("serveiSelector2").value;let r=null,s=null;if(e.getLayer("clicked-layer")){const n=e.getSource("clicked-layer");n&&n._data&&(r=n._data,e.getLayer("clicked-layer-labels")&&(s=n._data))}let l;o==="orto"?(l="https://geoserveis.icgc.cat/contextmaps/icgc_orto_estandard.json",S="#FFFFFF"):o==="topo"?(l="https://geoserveis.icgc.cat/contextmaps/icgc_mapa_estandard_general.json",S="#000000"):o==="fosc"&&(l="https://geoserveis.icgc.cat/contextmaps/icgc_mapa_base_fosc.json",S="#FFFFFF"),e.setStyle(l),e.once("styledata",()=>{const n=_(e.getStyle().layers),c=localStorage.getItem("clickedLayerColor")||"#f9f91d";r&&(e.getSource("clicked-layer")||e.addSource("clicked-layer",{type:"geojson",data:r}),e.getLayer("clicked-layer")||e.addLayer({id:"clicked-layer",type:"fill",source:"clicked-layer",layout:{},paint:{"fill-color":c,"fill-outline-color":c,"fill-opacity":.5}},n),s&&(e.removeLayer("clicked-layer"),e.getLayer("clicked-layer-labels")||(e.addLayer({id:"clicked-layer",type:"circle",source:"clicked-layer",paint:{"circle-radius":8,"circle-color":c}}),e.addLayer({id:"clicked-layer-labels",type:"symbol",source:"clicked-layer",layout:{"text-field":["get","Codi_ICC"],"text-font":["Arial-Bold"],"text-size":12,"text-offset":[0,1.5],"text-anchor":"top"},paint:{"text-color":S}})))),o==="topo"?e.setSky({"sky-color":"#a5f0f0","sky-horizon-blend":.3,"horizon-color":"#e1e3e3","horizon-fog-blend":.9,"fog-ground-blend":.85,"fog-color":"#c5d6d6"}):o==="orto"?e.setSky({"sky-color":"#37709e","sky-horizon-blend":.3,"horizon-color":"#e1e3e3","horizon-fog-blend":.9,"fog-ground-blend":.85,"fog-color":"#c5d6d6"}):o==="fosc"&&e.setSky({"sky-color":"#232423","sky-horizon-blend":.3,"horizon-color":"#969996","horizon-fog-blend":.9,"fog-ground-blend":.85,"fog-color":"#383838"}),j().then(function(){q()})})}async function j(){e.getSource("terrainMapZen")||e.addSource("terrainMapZen",{type:"raster-dem",url:"https://s3.amazonaws.com/elevation-tiles-prod/terrarium/{z}/{x}/{y}.png",tileSize:512,maxzoom:14})}function q(){try{e.setTerrain({source:"terrainMapZen",exaggeration:1.5})}catch(t){console.log("ERROR addTerrain"),console.log(t)}}function P(){e.getLayer("clicked-layer")&&e.removeLayer("clicked-layer"),e.getLayer("clicked-layer-labels")&&e.removeLayer("clicked-layer-labels"),e.getSource("clicked-layer")&&e.removeSource("clicked-layer")}function W(t){const o=_(e.getStyle().layers);e.getLayer("hovered-layer")&&e.removeLayer("hovered-layer"),e.getSource("hovered-layer")&&e.removeSource("hovered-layer");for(let r=0;r${a.etiqueta} (distància: ${a.distancia} km)
`),p&&(s.innerHTML+=`Coordenades: ${t.toFixed(5)}, ${o.toFixed(5)}
`,s.innerHTML+=`Elevació: ${p} metres
`);for(let i=0;i{g=u,B(u,d)}),d.addEventListener("mouseover",()=>{W(u)}),d.addEventListener("mouseout",()=>{Z()}),s.appendChild(d),s.appendChild(document.createElement("br"))}c.length>0&&!g?setTimeout(()=>{g=c[0],B(g,s.querySelector(".myButtonClass"))},25):g&&document.querySelectorAll(".myButtonClass").forEach(u=>{u.textContent.includes(g)&&B(g,u)})}T()}function B(t,o){const r=_(e.getStyle().layers);P();const s=document.querySelector(".closeButtonClass");s&&s.parentNode.removeChild(s);let l=new maplibregl.LngLatBounds;for(let a=0;a{const C=L.geometry.coordinates;C&&C.length===2&&typeof C[0]=="number"&&typeof C[1]=="number"&&l.extend(C);const I=L.properties;I&&(m.forEach(x=>{if(I[x]!==void 0){const w=document.createElement("div");if(x==="Enllaç"){const E=document.createElement("a"),O=I[x];E.href=O,E.textContent="Fitxa ↓",E.target="_blank",E.classList.add("button-link"),w.appendChild(E)}else w.textContent=`${x}: ${I[x]}`;i.appendChild(w)}}),i.appendChild(document.createElement("br")))})}else{const f=h[a].geometry;if(f){e.addSource("clicked-layer",{type:"geojson",data:{type:"Feature",geometry:f,properties:{}}}),e.addLayer({id:"clicked-layer",type:"fill",source:"clicked-layer",layout:{},paint:{"fill-color":p,"fill-outline-color":p,"fill-opacity":.5}},r),f.type==="Polygon"?f.coordinates[0].forEach(y=>{y&&y.length===2&&typeof y[0]=="number"&&typeof y[1]=="number"&&l.extend(y)}):f.type==="MultiPolygon"&&f.coordinates.forEach(y=>{y[0].forEach(m=>{m&&m.length===2&&typeof m[0]=="number"&&typeof m[1]=="number"&&l.extend(m)})});const k=h[a].properties;if(k)for(const[y,m]of Object.entries(k)){const L=document.createElement("div");L.textContent=`${y}: ${m}`,i.appendChild(L)}}}document.querySelectorAll(".layer-properties").forEach(f=>f.remove());const d=document.createElement("button");d.textContent="×",d.classList.add("closeButtonClass"),d.addEventListener("click",()=>{P(),i.remove(),d.remove(),o.classList.remove("highlighted-button")}),i.appendChild(d),o&&(o.parentNode.insertBefore(i,o.nextSibling),o.parentNode.insertBefore(d,o.nextSibling)),document.querySelectorAll(".myButtonClass").forEach(f=>f.classList.remove("highlighted-button")),o.classList.add("highlighted-button")}const c=window.innerWidth<750?D:R;l.isEmpty()||e.fitBounds(l,{padding:c})}function J(){V(),e=new maplibregl.Map({container:"map",style:"https://geoserveis.icgc.cat/contextmaps/icgc_mapa_estandard_general.json",center:[2.0042,41.7747],zoom:7,maxZoom:18,attributionControl:!1,hash:!1,maxPitch:85}),e.on("load",function(){j().then(function(){q()}),e.addControl(new maplibregl.NavigationControl,"top-right"),e.setSky({"sky-color":"#a5f0f0","sky-horizon-blend":.3,"horizon-color":"#e1e3e3","horizon-fog-blend":.9,"fog-ground-blend":.85,"fog-color":"#c5d6d6"});let t=null;const o=20,r=new maplibregl.GeolocateControl({positionOptions:{enableHighAccuracy:!0},trackUserLocation:!0});e.addControl(r,"top-right");function s(l,n,c,a){const i=(c-l)*Math.PI/180,u=(a-n)*Math.PI/180,d=Math.sin(i/2)*Math.sin(i/2)+Math.cos(l*Math.PI/180)*Math.cos(c*Math.PI/180)*Math.sin(u/2)*Math.sin(u/2);return 6371e3*(2*Math.atan2(Math.sqrt(d),Math.sqrt(1-d)))}r.on("geolocate",function(l){const n=l.coords.longitude,c=l.coords.latitude;if(t&&s(t.lat,t.lon,c,n){document.querySelector(".myButtonClass.highlighted-button")&&B(g,document.querySelector(".myButtonClass.highlighted-button"))})):z(a,c,A);const p=localStorage.getItem("markerColor")||"#ff6e42";b?b.setLngLat([c,a]):b=new maplibregl.Marker({color:p}).setLngLat([c,a]).addTo(e)}),Q()})}function _(t){let o="background";for(var r=0;r${l.features[0].properties.etiqueta}
- Carrer: ${l.features[0].properties.nom}
- Municipi: ${l.features[0].properties.municipi}
- Codi Postal: ${l.features[0].properties.codi_postal}
`).addTo(e)}),e.on("mouseleave","punts2",function(l){e.getCanvas().style.cursor="",s.remove()}))}function K(){document.getElementById("loader").style.display="block",document.getElementById("infoPanelContent").style.display="none"}function T(){document.getElementById("loader").style.display="none",document.getElementById("infoPanelContent").style.display="block"}function V(){document.getElementById("mapLoader").style.display="flex"}function Q(){document.getElementById("mapLoader").style.display="none"}class X{onAdd(o){return this._map=o,this._container=document.createElement("button"),this._container.className="maplibregl-ctrl pitch-control",this._container.textContent="3D",this._container.onclick=()=>{this._map.getPitch()===0?(this._map.easeTo({pitch:60}),this._container.textContent="2D"):(this._map.easeTo({pitch:0}),this._container.textContent="3D")},this._container}onRemove(){this._container.parentNode.removeChild(this._container),this._map=void 0}}function Y(){var t=document.getElementById("notification");t&&t.classList.remove("show");var o=document.getElementById("myModal"),r=document.getElementById("configListContainer");o.style.display="block",fetch("https://api.icgc.cat/territori/info").then(n=>n.json()).then(n=>{r.innerHTML="";const c=document.createElement("div"),a=document.createElement("input");a.type="checkbox",a.id="selectAllCheckbox";const p=document.createElement("label");c.id="selectDiv",p.id="selectLabel",p.htmlFor="selectAllCheckbox",p.textContent=" Seleccionar tots",c.appendChild(a),c.appendChild(p),r.appendChild(c),a.addEventListener("change",function(){r.querySelectorAll('input[type="checkbox"]:not(#selectAllCheckbox)').forEach(u=>{u.checked=a.checked})}),n.forEach(i=>{if(i.nomAPI!=="geocoder"&&i.nomAPI!=="elevacions"){const u=document.createElement("div");u.className="config-item";const d=document.createElement("input");d.type="checkbox",d.id=`${i.nomAPI}`,d.name=i.name,d.checked=!0;const v=document.createElement("label");v.htmlFor=`checkbox-${i.nomAPI}`,v.textContent=i.text,u.appendChild(d),u.appendChild(v),r.appendChild(u),d.addEventListener("change",function(){l()})}}),N(),l()}).catch(n=>console.error("Error fetching data:",n));var s=document.getElementsByClassName("close")[0];s.onclick=function(){$(),o.style.display="none"},window.onclick=function(n){n.target==o&&($(),o.style.display="none")};function l(){const n=r.querySelectorAll('input[type="checkbox"]:not(#selectAllCheckbox)'),c=Array.from(n).every(a=>a.checked);selectAllCheckbox.checked=c}}function $(){const t=document.querySelectorAll('.config-item input[type="checkbox"]'),o=Array.from(t).map(r=>({id:r.id,checked:r.checked}));localStorage.setItem("layerConfig",JSON.stringify(o))}function N(){const t=JSON.parse(localStorage.getItem("layerConfig"));t&&(M=t,t.forEach(o=>{const r=document.getElementById(o.id);r&&(r.checked=o.checked)}))}function H(){var t=document.getElementById("infoPanel");t.classList.add("open"),t.style.width="300px",document.getElementById("openPanel").style.display="none"}function ee(){var t=document.getElementById("infoPanel");t.classList.remove("open"),t.style.width="0px",document.getElementById("openPanel").style.display="block"}function te(){J();const t=document.getElementById("textSelector");t.addEventListener("change",()=>{const r=t.value;U(r)}),document.getElementById("layerConfig").addEventListener("click",()=>{Y()})}window.addEventListener("DOMContentLoaded",te);document.getElementById("layerColor").addEventListener("input",t=>{const o=t.target.value;localStorage.setItem("clickedLayerColor",o),oe(o)});function oe(t){e.getLayer("clicked-layer")&&(e.setPaintProperty("clicked-layer","fill-color",t),e.setPaintProperty("clicked-layer","fill-outline-color",t))}document.getElementById("markerColor").addEventListener("input",t=>{const o=t.target.value;localStorage.setItem("markerColor",o),ne(o)});function ne(t){if(b){b.setPopup(null);const o=b.getLngLat();b.remove(),b=new maplibregl.Marker({color:t}).setLngLat(o).addTo(e)}}"serviceWorker"in navigator&&window.addEventListener("load",()=>{navigator.serviceWorker.register("/serviceworker.js").then(t=>{console.log("Service Worker registered with scope:",t.scope)},t=>{console.log("Service Worker registration failed:",t)})});window.closePanel=ee;window.openPanel=H;window.onBaseChange=G;
diff --git a/dist/assets/index-oJ0Wf6Mg.js b/dist/assets/index-oJ0Wf6Mg.js
new file mode 100644
index 0000000..d6dc886
--- /dev/null
+++ b/dist/assets/index-oJ0Wf6Mg.js
@@ -0,0 +1,4 @@
+(function(){const o=document.createElement("link").relList;if(o&&o.supports&&o.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))s(l);new MutationObserver(l=>{for(const n of l)if(n.type==="childList")for(const i of n.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&s(i)}).observe(document,{childList:!0,subtree:!0});function r(l){const n={};return l.integrity&&(n.integrity=l.integrity),l.referrerPolicy&&(n.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?n.credentials="include":l.crossOrigin==="anonymous"?n.credentials="omit":n.credentials="same-origin",n}function s(l){if(l.ep)return;l.ep=!0;const n=r(l);fetch(l.href,n)}})();var e,b;let A="",F=!0,h,g=null,B,S="#000000";const D={top:60,bottom:window.innerHeight*.5+25,left:60,right:60},R={top:100,bottom:100,left:300,right:50};async function G(){const o=document.getElementById("serveiSelector2").value;let r=null,s=null;if(e.getLayer("clicked-layer")){const n=e.getSource("clicked-layer");n&&n._data&&(r=n._data,e.getLayer("clicked-layer-labels")&&(s=n._data))}let l;o==="orto"?(l="https://geoserveis.icgc.cat/contextmaps/icgc_orto_estandard.json",S="#FFFFFF"):o==="topo"?(l="https://geoserveis.icgc.cat/contextmaps/icgc_mapa_estandard_general.json",S="#000000"):o==="fosc"&&(l="https://geoserveis.icgc.cat/contextmaps/icgc_mapa_base_fosc.json",S="#FFFFFF"),e.setStyle(l),e.once("styledata",()=>{const n=_(e.getStyle().layers),i=localStorage.getItem("clickedLayerColor")||"#f9f91d";r&&(e.getSource("clicked-layer")||e.addSource("clicked-layer",{type:"geojson",data:r}),e.getLayer("clicked-layer")||e.addLayer({id:"clicked-layer",type:"fill",source:"clicked-layer",layout:{},paint:{"fill-color":i,"fill-outline-color":i,"fill-opacity":.5}},n),s&&(e.removeLayer("clicked-layer"),e.getLayer("clicked-layer-labels")||(e.addLayer({id:"clicked-layer",type:"circle",source:"clicked-layer",paint:{"circle-radius":8,"circle-color":i}}),e.addLayer({id:"clicked-layer-labels",type:"symbol",source:"clicked-layer",layout:{"text-field":["get","Codi_ICC"],"text-font":["Arial-Bold"],"text-size":12,"text-offset":[0,1.5],"text-anchor":"top"},paint:{"text-color":S}})))),o==="topo"?e.setSky({"sky-color":"#a5f0f0","sky-horizon-blend":.3,"horizon-color":"#e1e3e3","horizon-fog-blend":.9,"fog-ground-blend":.85,"fog-color":"#c5d6d6"}):o==="orto"?e.setSky({"sky-color":"#37709e","sky-horizon-blend":.3,"horizon-color":"#e1e3e3","horizon-fog-blend":.9,"fog-ground-blend":.85,"fog-color":"#c5d6d6"}):o==="fosc"&&e.setSky({"sky-color":"#232423","sky-horizon-blend":.3,"horizon-color":"#969996","horizon-fog-blend":.9,"fog-ground-blend":.85,"fog-color":"#383838"}),j().then(function(){q()})})}async function j(){e.getSource("terrainMapZen")||e.addSource("terrainMapZen",{type:"raster-dem",url:"https://s3.amazonaws.com/elevation-tiles-prod/terrarium/{z}/{x}/{y}.png",tileSize:512,maxzoom:14})}function q(){try{e.setTerrain({source:"terrainMapZen",exaggeration:1.5})}catch(t){console.log("ERROR addTerrain"),console.log(t)}}function P(){e.getLayer("clicked-layer")&&e.removeLayer("clicked-layer"),e.getLayer("clicked-layer-labels")&&e.removeLayer("clicked-layer-labels"),e.getSource("clicked-layer")&&e.removeSource("clicked-layer")}function W(t){const o=_(e.getStyle().layers);e.getLayer("hovered-layer")&&e.removeLayer("hovered-layer"),e.getSource("hovered-layer")&&e.removeSource("hovered-layer");for(let r=0;r${a.etiqueta} (distància: ${a.distancia} km)`),p&&(s.innerHTML+=`Coordenades: ${t.toFixed(5)}, ${o.toFixed(5)}
`,s.innerHTML+=`Elevació: ${p} metres
`);for(let c=0;c{g=u,M(u,d)}),d.addEventListener("mouseover",()=>{W(u)}),d.addEventListener("mouseout",()=>{Z()}),s.appendChild(d),s.appendChild(document.createElement("br"))}i.length>0&&!g?setTimeout(()=>{g=i[0],M(g,s.querySelector(".myButtonClass"))},25):g&&document.querySelectorAll(".myButtonClass").forEach(u=>{u.textContent.includes(g)&&M(g,u)})}T()}function M(t,o){const r=_(e.getStyle().layers);P();const s=document.querySelector(".closeButtonClass");s&&s.parentNode.removeChild(s);let l=new maplibregl.LngLatBounds;for(let a=0;a{const C=L.geometry.coordinates;C&&C.length===2&&typeof C[0]=="number"&&typeof C[1]=="number"&&l.extend(C);const I=L.properties;I&&(m.forEach(x=>{if(I[x]!==void 0){const w=document.createElement("div");if(x==="Enllaç"){const E=document.createElement("a"),O=I[x];E.href=O,E.textContent="Fitxa ↓",E.target="_blank",E.classList.add("button-link"),w.appendChild(E)}else w.textContent=`${x}: ${I[x]}`;c.appendChild(w)}}),c.appendChild(document.createElement("br")))})}else{const f=h[a].geometry;if(f){e.addSource("clicked-layer",{type:"geojson",data:{type:"Feature",geometry:f,properties:{}}}),e.addLayer({id:"clicked-layer",type:"fill",source:"clicked-layer",layout:{},paint:{"fill-color":p,"fill-outline-color":p,"fill-opacity":.5}},r),f.type==="Polygon"?f.coordinates[0].forEach(y=>{y&&y.length===2&&typeof y[0]=="number"&&typeof y[1]=="number"&&l.extend(y)}):f.type==="MultiPolygon"&&f.coordinates.forEach(y=>{y[0].forEach(m=>{m&&m.length===2&&typeof m[0]=="number"&&typeof m[1]=="number"&&l.extend(m)})});const k=h[a].properties;if(k)for(const[y,m]of Object.entries(k)){const L=document.createElement("div");L.textContent=`${y}: ${m}`,c.appendChild(L)}}}document.querySelectorAll(".layer-properties").forEach(f=>f.remove());const d=document.createElement("button");d.textContent="×",d.classList.add("closeButtonClass"),d.addEventListener("click",()=>{P(),c.remove(),d.remove(),o.classList.remove("highlighted-button")}),c.appendChild(d),o&&(o.parentNode.insertBefore(c,o.nextSibling),o.parentNode.insertBefore(d,o.nextSibling)),document.querySelectorAll(".myButtonClass").forEach(f=>f.classList.remove("highlighted-button")),o.classList.add("highlighted-button")}const i=window.innerWidth<750?D:R;l.isEmpty()||e.fitBounds(l,{padding:i})}function J(){V(),e=new maplibregl.Map({container:"map",style:"https://geoserveis.icgc.cat/contextmaps/icgc_mapa_estandard_general.json",center:[2.0042,41.7747],zoom:7,maxZoom:18,attributionControl:!1,hash:!1,maxPitch:85}),e.on("load",function(){j().then(function(){q()}),e.addControl(new maplibregl.NavigationControl,"top-right"),e.setSky({"sky-color":"#a5f0f0","sky-horizon-blend":.3,"horizon-color":"#e1e3e3","horizon-fog-blend":.9,"fog-ground-blend":.85,"fog-color":"#c5d6d6"});let t=null;const o=20,r=new maplibregl.GeolocateControl({positionOptions:{enableHighAccuracy:!0},trackUserLocation:!0});e.addControl(r,"top-right");function s(l,n,i,a){const c=(i-l)*Math.PI/180,u=(a-n)*Math.PI/180,d=Math.sin(c/2)*Math.sin(c/2)+Math.cos(l*Math.PI/180)*Math.cos(i*Math.PI/180)*Math.sin(u/2)*Math.sin(u/2);return 6371e3*(2*Math.atan2(Math.sqrt(d),Math.sqrt(1-d)))}r.on("geolocate",function(l){const n=l.coords.longitude,i=l.coords.latitude;if(t&&s(t.lat,t.lon,i,n){document.querySelector(".myButtonClass.highlighted-button")&&M(g,document.querySelector(".myButtonClass.highlighted-button"))})):z(a,i,A);const p=localStorage.getItem("markerColor")||"#ff6e42";b?b.setLngLat([i,a]):b=new maplibregl.Marker({color:p}).setLngLat([i,a]).addTo(e)}),Q()})}function _(t){let o="background";for(var r=0;r${l.features[0].properties.etiqueta}
+ Carrer: ${l.features[0].properties.nom}
+ Municipi: ${l.features[0].properties.municipi}
+ Codi Postal: ${l.features[0].properties.codi_postal}
`).addTo(e)}),e.on("mouseleave","punts2",function(l){e.getCanvas().style.cursor="",s.remove()}))}function K(){document.getElementById("loader").style.display="block",document.getElementById("infoPanelContent").style.display="none"}function T(){document.getElementById("loader").style.display="none",document.getElementById("infoPanelContent").style.display="block"}function V(){document.getElementById("mapLoader").style.display="flex"}function Q(){document.getElementById("mapLoader").style.display="none"}class X{onAdd(o){return this._map=o,this._container=document.createElement("button"),this._container.className="maplibregl-ctrl pitch-control",this._container.textContent="3D",this._container.onclick=()=>{this._map.getPitch()===0?(this._map.easeTo({pitch:60}),this._container.textContent="2D"):(this._map.easeTo({pitch:0}),this._container.textContent="3D")},this._container}onRemove(){this._container.parentNode.removeChild(this._container),this._map=void 0}}function Y(){var t=document.getElementById("notification");t&&t.classList.remove("show");var o=document.getElementById("myModal"),r=document.getElementById("configListContainer");o.style.display="block",fetch("https://api.icgc.cat/territori/info").then(n=>n.json()).then(n=>{r.innerHTML="";const i=document.createElement("div"),a=document.createElement("input");a.type="checkbox",a.id="selectAllCheckbox";const p=document.createElement("label");i.id="selectDiv",p.id="selectLabel",p.htmlFor="selectAllCheckbox",p.textContent=" Seleccionar tots",i.appendChild(a),i.appendChild(p),r.appendChild(i),a.addEventListener("change",function(){r.querySelectorAll('input[type="checkbox"]:not(#selectAllCheckbox)').forEach(u=>{u.checked=a.checked})}),n.forEach(c=>{if(c.nomAPI!=="geocoder"&&c.nomAPI!=="elevacions"&&c.nomAPI!=="h3"){const u=document.createElement("div");u.className="config-item";const d=document.createElement("input");d.type="checkbox",d.id=`${c.nomAPI}`,d.name=c.name,d.checked=!0;const v=document.createElement("label");v.htmlFor=`checkbox-${c.nomAPI}`,v.textContent=c.text,u.appendChild(d),u.appendChild(v),r.appendChild(u),d.addEventListener("change",function(){l()})}}),N(),l()}).catch(n=>console.error("Error fetching data:",n));var s=document.getElementsByClassName("close")[0];s.onclick=function(){$(),o.style.display="none"},window.onclick=function(n){n.target==o&&($(),o.style.display="none")};function l(){const n=r.querySelectorAll('input[type="checkbox"]:not(#selectAllCheckbox)'),i=Array.from(n).every(a=>a.checked);selectAllCheckbox.checked=i}}function $(){const t=document.querySelectorAll('.config-item input[type="checkbox"]'),o=Array.from(t).map(r=>({id:r.id,checked:r.checked}));localStorage.setItem("layerConfig",JSON.stringify(o))}function N(){const t=JSON.parse(localStorage.getItem("layerConfig"));t&&(B=t,t.forEach(o=>{const r=document.getElementById(o.id);r&&(r.checked=o.checked)}))}function H(){var t=document.getElementById("infoPanel");t.classList.add("open"),t.style.width="300px",document.getElementById("openPanel").style.display="none"}function ee(){var t=document.getElementById("infoPanel");t.classList.remove("open"),t.style.width="0px",document.getElementById("openPanel").style.display="block"}function te(){J();const t=document.getElementById("textSelector");t.addEventListener("change",()=>{const r=t.value;U(r)}),document.getElementById("layerConfig").addEventListener("click",()=>{Y()})}window.addEventListener("DOMContentLoaded",te);document.getElementById("layerColor").addEventListener("input",t=>{const o=t.target.value;localStorage.setItem("clickedLayerColor",o),oe(o)});function oe(t){e.getLayer("clicked-layer")&&(e.setPaintProperty("clicked-layer","fill-color",t),e.setPaintProperty("clicked-layer","fill-outline-color",t))}document.getElementById("markerColor").addEventListener("input",t=>{const o=t.target.value;localStorage.setItem("markerColor",o),ne(o)});function ne(t){if(b){b.setPopup(null);const o=b.getLngLat();b.remove(),b=new maplibregl.Marker({color:t}).setLngLat(o).addTo(e)}}"serviceWorker"in navigator&&window.addEventListener("load",()=>{navigator.serviceWorker.register("/serviceworker.js").then(t=>{console.log("Service Worker registered with scope:",t.scope)},t=>{console.log("Service Worker registration failed:",t)})});window.closePanel=ee;window.openPanel=H;window.onBaseChange=G;
diff --git a/dist/index.html b/dist/index.html
index 4f11cfc..de0eb9a 100644
--- a/dist/index.html
+++ b/dist/index.html
@@ -695,7 +695,7 @@
}
-
+
diff --git a/src/main.js b/src/main.js
index c228208..e430fe5 100644
--- a/src/main.js
+++ b/src/main.js
@@ -284,7 +284,7 @@ async function apiConnect(lat, lon, service) {
contentHtml.innerHTML += `Elevació: ${elevation} metres
`
}
for (let j = 0; j < serveisDisponibles.length; j++) {
- if (serveisDisponibles[j] !== 'Geocodificador' && serveisDisponibles[j] !== 'Elevació' && serveisDisponibles[j] !== 'Malla hexagonal H3') {
+ if (serveisDisponibles[j] !== 'Geocodificador' && serveisDisponibles[j] !== 'Elevació' && serveisDisponibles[j] !== 'H3 geospatial indexing system') {
const servei = serveisDisponibles[j];
const button = document.createElement('button');
button.textContent = servei;
@@ -803,7 +803,7 @@ function mapSettings() {
// Afegir els altres checkboxes
data.forEach(item => {
- if (item.nomAPI !== 'geocoder' && item.nomAPI !== 'elevacions') {
+ if (item.nomAPI !== 'geocoder' && item.nomAPI !== 'elevacions' && item.nomAPI !== 'h3') {
const listItem = document.createElement('div');
listItem.className = 'config-item';
const checkbox = document.createElement('input');