How to get Lat, Long from a clicked location using Api flyers

I am using OSM with an API. Now I want to get a lat and a long click. I meant something like this. ex: http://openlayers.org/dev/examples/click.html

map.events.register("click", map, function(e) { var position = map.getLonLatFromPixel(e.xy); alert("Lat, Lon : "+position.lon.toFixed(3),position.lat.toFixed(3)); }); 

This code in open layers helps to get lat, long values ​​.... looking for something similar with a flyer ........ Any help would be really wonderful ..... Thanks in advance

+8
openstreetmap leaflet
source share
1 answer
 map.on('click', function(e) { alert(e.latlng); }); 

Documentation

+16
source share

All Articles