百度地图API-通过经纬度解析出当前位于市\区\县\什么路\多少号

var x = 115.792111;
var y = 33.877972;
var point = new BMap.Point(x,y);
var geoc = new BMap.Geocoder();
geoc.getLocation(point, function(rs){
var addComp = rs.addressComponents;
$('p').html(addComp.city+addComp.district+addComp.street+addComp.streetNumber);
});

posted @ 2017-12-12 15:47  九段刀客  阅读(767)  评论(0编辑  收藏  举报