diff --git a/frontend/src/lib/components/tabs/MapTab.svelte b/frontend/src/lib/components/tabs/MapTab.svelte index b1a5ba2..2021fdf 100644 --- a/frontend/src/lib/components/tabs/MapTab.svelte +++ b/frontend/src/lib/components/tabs/MapTab.svelte @@ -38,7 +38,11 @@ latitude = crd.latitude; longitude = crd.longitude; accuracy = crd.accuracy; - + + const userMarker = leaflet.marker([latitude, longitude]).addTo(map); + // move the map to have the location in its center + map.panTo(userMarker.getLatLng()); + string += "Your current position is:"; string += `Latitude : ${crd.latitude}`; string += `Longitude: ${crd.longitude}`;