微信小程序地图定位显示
微信小程序中可以调用微信小程序内置的地图信息。
实现效果:
wxml:
<view class='ServiceCenterButton02' bindtap='gotomapLocation' >
<text style='margin-top:1.5vw;display: inline-block;'>一键导航</text>
</view>
js:
gotomapLocation:function(){//地图一键导航
wx.getLocation({
type: 'gcj02', //返回可以用于wx.openLocation的经纬度
success: function (res) {
var latitude = res.latitude
var longi