微信公众号,地图模块

相关代码

 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类型不会跳转到地图界面,虽然也不会报错,

    最终效果为:

    微信公众号,地图模块_第1张图片

你可能感兴趣的:(微信公众号,地图定位,vue.js)