mapCtx.moveToLocation不能回到定位点
onReady: function (e) {
// 使用 wx.createMapContext 获取 map 上下文
this.mapCtx = wx.createMapContext(’#map’);
},
controlTap: function (e) {
console.log(e.controlId);
if (e.controlId == 3) {
this.mapCtx.moveToLocation();
}
},
<map id=“map” include-points="{{points}}" show-location controls=’{{controls}}’ bindcontroltap=“controlTap” bindmarkertap=“markerTap” markers="{{markers}}">