Looking for script to get coords from a google map
I have bee开发者_开发问答n looking for a script which lets you search a map for a location and lets you click the map to put the clicked coordinates into a form. So far I have had no luck!
Any ideas? Thanks!
using v3 api to click on the map and get the lat/lng of the location:
google.maps.event.addListener(map, 'click', function(e){
alert('lat: ' + e.latLng.lat() + ' lng: ' + e.latLng.lng());
})
see example http://jsfiddle.net/6aGf7/
精彩评论