发布网友 发布时间:2022-04-21 21:36
共1个回答
热心网友 时间:2023-12-12 20:41
输入点的坐标,可以解析出点所在的省市区街道
map.addEventListener("click", function(e){
var pt = e.point;
geoc.getLocation(pt, function(rs){
var addComp = rs.addressComponents;
alert(addComp.province + ", " + addComp.city + ", " + addComp.district + ", " + addComp.street + ", " + addComp.streetNumber);
});
});