let map = new BMap.Map("map");
let point = new BMap.Point(112.55086359, 37.89027705);
map.centerAndZoom(point, 16);
let that = this;
let options = {
onSearchComplete:(results)=>{
// 判断状态是否正确
if (local.getStatus() == 0){
console.log(results.getPoi(0).address); // 这就是我们想要的地址啦!
} else {
alert('没有搜索到该地址!')
}
}
};
let local = new BMap.LocalSearch(map, options);
local.search(“你要找的地方”);