微信公衆號,地圖模塊

相關代碼

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類型不會跳轉到地圖界面,雖然也不會報錯,

    最終效果爲:git

    clipboard.png

    clipboard.png

相關文章
相關標籤/搜索