wx.getLocation({//成功定位之后才能用        type: 'gcj02', // 返回可以用于wx.openLocation的经纬度        success(res) {          const latitude = res.latitude          const longitude = res.longitude          wx.openLocation({            latitude: parseFloat(wx.getStorageSync("shopInfo").lat),//这里是目的地的经纬度            longitude: parseFloat(wx.getStorageSync("shopInfo").lng),            name: wx.getStorageSync("shopInfo").shopName,//目的地的名字            address: wx.getStorageSync("shopInfo").address,//目的地地址            scale: 18          })        }      })

 

TAG标签: 微信小程序gcj02

http://www.xiaochengxub.com/read-104245.html