<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;
}
})
}
regionChange方法没写到 map组件上
你好,麻烦提供出现问题的具体机型、微信版本号、系统版本号,以及能复现问题的代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)