//必须要导入googleAPI才可以这么做 V3
var geocoder = new google.maps.Geocoder();
function parseAddress (weidu,jingdu,id){
if(document.getElementById(id)!=null){
geocoder.geocode({"address":weidu+","+jingdu}, function(results,status) {
if (status == google.maps.GeocoderStatus.OK) { document.getElementById(id).innerHTML=results[0].formatted_address;
}
});
}
}
通过经纬度获取地址信息(googleMap v3)
最新推荐文章于 2021-10-09 17:16:49 发布
本文介绍了一种使用Google Maps API V3进行地理编码解析的方法。通过传递经纬度参数,可以获取对应的地址信息并显示在指定的HTML元素中。此功能依赖于Google Maps Geocoder服务。
5534

被折叠的 条评论
为什么被折叠?



