微信公众号,地图模块

云胡不喜

相关代码

 wx.openLocation({
        latitude: !!that.addressPoint.latitude
          ? Number(that.addressPoint.latitude)
          : 34.194024,
        longitude: !!that.addressPoint.longitude
          ? Number(that.addressPoint.longitude)
          : 108.937925,
        name: !!that.addressPoint.name
          ? that.addressPoint.name
          : "声动语商学苑",
        address: !!that.addressPoint.address
          ? that.addressPoint.address
          : "西安市"
      });
  **
  • 注意:wx的openLocation方法绑定的经纬度坐标值必须为number类型,string类型不会跳转到地图界面,虽然也不会报错,

    最终效果为:

    clipboard.png

    clipboard.png

阅读 1.5k

前端的忠实粉丝

70 声望
10 粉丝
0 条评论

前端的忠实粉丝

70 声望
10 粉丝
文章目录
宣传栏