On each iteration add marker to map
All checks were successful
ci/woodpecker/push/build Pipeline was successful
All checks were successful
ci/woodpecker/push/build Pipeline was successful
This commit is contained in:
parent
9e197a2b13
commit
9b60c4437c
1 changed files with 5 additions and 1 deletions
|
@ -39,6 +39,10 @@
|
|||
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}`;
|
||||
|
|
Loading…
Reference in a new issue