Google Map通过经纬度获取详细地址

    
myLatLng = new google.maps.LatLng(23.149, 113.349);
var beachMarker = new google.maps.Marker({
    position: myLatLng,
        map: map
});
var geocoder = new google.maps.Geocoder();

google.maps.event.addListener(beachMarker, 'click', function () { 
    geocoder.geocode( { 'location': myLatLng}, function(results, status) {
	if (status == google.maps.GeocoderStatus.OK) {
		console.log(results[0].formatted_address);
	} else {
		console.log('error');
	}
    });
});

 
 
  • 原文地址:http://blog.csdn.net/yueritian/article/details/50384706

你可能感兴趣的:(经纬度,谷歌,地图,googlemap,详细地址)