How to get geo coordinates on clicked location using leaflet? I try something like ..
$scope.$on('leafletDirectiveMap.geojsonClick', function (e) {
alert("Lat, Lon : " + e.latlng.lat + ", " + e.latlng.lng)
});
but it didn't work.
angular-leaflet
wraps up the regular leaflet event in the second argument.
Alos, you just want 'click'
like normal leaflet but with the 'leafletDirectiveMap'
prefix.
$scope.$on('leafletDirectiveMap.click', function (e, wrap) {
alert("Lat, Lon : " + wrap.leafletEvent.latlng.lat + ", " + wrap.leafletEvent.latlng.lng)
});