map regionChange提示Invoke event regionChange?
<map bindregionchange="regionChange" ></map> regionChange 里请求接口 if (res.type == 'end' && res.causedBy == "drag" && drag) {
let mapCtx = wx.createMapContext('indexMap', this);
mapCtx.getCenterLocation({
success: (res) => {
console.log('getCenterLocation succ', res)
let loc = transformLoc(res, GCJ02, BD09);
//这里用新loc请求接口 此函数没有触发
},
fail: (error) => {
console.log('getCenterLocation err', error);
drag = true;
}
})
}