leaflet-locatecontrol
leaflet-locatecontrol copied to clipboard
Display lat, lng, alt in the inner marker popup
Would it be possible to change the popup string to show the lat, lng and altitude of my position?
These are variables that I have defined in my script.
lc = L.control.myLocate({ locateOptions: { enableHighAccuracy: true } }).addTo(map);
map.on('locationfound', function (evt) {
LatLng = evt.latlng;
longitud= LatLng.lng;
latitud= LatLng.lat;
altitud= evt.altitude;
currentPos = [latitud, longitud];