I am looking for a spc api/method to get the address/Lat Lang of a tapped point in google maps. 开发者_如何学PythonBasically the need is to allow user to choose location from tapping into the google map. Once the user taps into a particular location on map, some event should get generated to get the location string as well as lat lang of that tapped place.
Any help/suggestions would be great.
Thanks
What you are after is reverse geocoding. You pass your latitude/longitude from your click event to the geocoder javascript object and you will get back the address. So in your click event:
geocoder.geocode({'latLng': latlng}, function(results, status) {
if (status == google.maps.GeocoderStatus.OK) {
if (results[0]) {
// render the address
精彩评论