var geocoder = new AMap.Geocoder({
city: "010", //城市,默认:“全国”
radius: 1000 //范围,默认:500
});
var local
//地理编码,返回地理编码结果
geocoder.getLocation("北京市海淀区苏州街", function(status, result) {
if (status === 'complete' && result.info === 'OK') {
loc_value = result.geocodes["0"].location
local = [loc_value.getLng(),loc_value.getLat()]
}
});
高德JS API——正向地理编码(地址-坐标)
最新推荐文章于 2024-04-28 15:04:07 发布