在运行以下code的时候,发现无法console.log(res.longtitude)及console.log(res.latitude).
<map id="myMap" show-location />
<button type="primary" bindtap="getCenterLocation">获取位置button>
<button type="primary" bindtap="moveToLocation">移动位置button>
// map.jsPage({
  onReady: function (e) {    // 使用 wx.createMapContext 获取 map 上下文
    this.mapCtx = wx.createMapContext('myMap')
  },  getCenterLocation: function () {
    this.mapCtx.getCenterLocation({
      success: function(res){
        console.log(res.longitude)
        console.log(res.latitude)
      }
    })
  },  moveToLocation: function () {
    this.mapCtx.moveToLocation()
  }
)
在调试模式的scope中查看mapCtx中根本就没有getCenterLocation函数:
![]()
请问有谁遇到类似问题吗,感谢!
