This commit is contained in:
parent
40277e3380
commit
0c631c7a36
2 changed files with 8 additions and 4 deletions
|
@ -48,9 +48,7 @@
|
|||
navigator.geolocation.watchPosition(success, error, options);
|
||||
};
|
||||
|
||||
onMount(async () => {
|
||||
await watchPosition();
|
||||
leaflet = await import('leaflet');
|
||||
const renderMap = () => {
|
||||
layerGroup = leaflet.layerGroup();
|
||||
|
||||
// Startup Map
|
||||
|
@ -61,7 +59,7 @@
|
|||
});
|
||||
|
||||
map.setView(pianelloCoordinates, 13);
|
||||
|
||||
|
||||
map.setMaxBounds(map.getBounds());
|
||||
|
||||
leaflet
|
||||
|
@ -70,6 +68,12 @@
|
|||
'© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
|
||||
})
|
||||
.addTo(map);
|
||||
}
|
||||
|
||||
onMount(async () => {
|
||||
await watchPosition();
|
||||
leaflet = await import('leaflet');
|
||||
renderMap()
|
||||
});
|
||||
|
||||
onDestroy(async () => {
|
||||
|
|
Loading…
Reference in a new issue