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
|
@ -38,7 +38,11 @@
|
||||||
latitude = crd.latitude;
|
latitude = crd.latitude;
|
||||||
longitude = crd.longitude;
|
longitude = crd.longitude;
|
||||||
accuracy = crd.accuracy;
|
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 += "Your current position is:";
|
||||||
string += `Latitude : ${crd.latitude}`;
|
string += `Latitude : ${crd.latitude}`;
|
||||||
string += `Longitude: ${crd.longitude}`;
|
string += `Longitude: ${crd.longitude}`;
|
||||||
|
|
Loading…
Reference in a new issue