Compare commits

..

No commits in common. "86543619e8603f5fefaab480a733dbaeeb9834e7" and "d317405194fbb2020dccff86e33e8bb896d080d8" have entirely different histories.

2 changed files with 9 additions and 9 deletions

View file

@ -41,7 +41,7 @@
<button id="desc">Descrizione</button> <button id="desc">Descrizione</button>
<button id="map">Mappa</button> <button id="map">Mappa</button>
</div> </div>
<div class="tab" bind:this={ref} role="tab"> <div class="tab" bind:this={ref}>
<svelte:component this={component} route={route} /> <svelte:component this={component} route={route} />
</div> </div>
</div> </div>

View file

@ -12,9 +12,6 @@
let longitude; let longitude;
let accuracy; let accuracy;
const errorMessage = "Geolocation not available"; const errorMessage = "Geolocation not available";
const attribution = '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors';
const openStreetMapTile = 'https://tile.openstreetmap.org/{z}/{x}/{y}.png';
let errored = false; let errored = false;
const watchPosition = async () => { const watchPosition = async () => {
@ -62,10 +59,14 @@
}); });
map.setView(pianelloCoordinates, 13); map.setView(pianelloCoordinates, 13);
map.setMaxBounds(map.getBounds()); map.setMaxBounds(map.getBounds());
leaflet leaflet
.tileLayer(openStreetMapTile, {attribution}) .tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
attribution:
'&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
})
.addTo(map); .addTo(map);
} }
@ -82,7 +83,6 @@
} }
}); });
</script> </script>
{#if !errored} {#if !errored}
<div id="map" in:fade bind:this={mapElement} /> <div id="map" in:fade bind:this={mapElement} />
{:else} {:else}