Skip to content

Getting Latitude Longitude from clicks on a map

Benoy Maniara edited this page Jan 22, 2015 · 1 revision

An event listener needs to be added which calls a callback function providing it an object as a parameter containing the lat/long coordinates.

google.maps.event.addListener(map, "click", function (e) {
  //lat and lng is available in e object
  var latLng = e.latLng;
});