首先需要引入<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=您的密钥"></script>
js内:
var geoc = new BMap.Geocoder();
var point = new BMap.Point(经度, 纬度);
geoc.getLocation(point, function(rs){
var addComp = rs.addressComponents;
alert(addComp.province + ", " + addComp.city + ", " + addComp.district + ", " + addComp.street + ", " + addComp.streetNumber);
//var city = addComp.substring(0 , addComp.length-1);
})