收藏
回答

小程序map组件初始化中心点不在视图中心?

  wx.getFuzzyLocation({
      // type: 'wgc84',
      type"gcj02",
      success(res) {
        that.setData({
          latitude: res.latitude,
          longitude: res.longitude
        })
      }

    })

获取经纬度之后

<map id="myMap" style="width: 100%; height: 100%;" latitude="{{latitude}}" longitude="{{longitude}}" show-location
  markers="{{markers}}" bindmarkertap="chooseMarker">
</map>
放入地图中,实际结果如下:

这是初始化地图

实际中心点位置,求解?

回答关注问题邀请回答
收藏

1 个回答

  • Demons
    Demons
    2022-10-30

    你好,麻烦提供出现问题的具体机型、微信版本号、系统版本号,以及能复现问题的代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)

    2022-10-30
    有用
    回复 1
    • .
      .
      2023-03-07
      iphone12  微信版本号8.0.32  系统版本ios16.1.2  代码片段在上边  进入页面的中心点不在实际定位点
      2023-03-07
      回复
登录 后发表内容