微信小程序API 查看位置
wx.openLocation(OBJECT)
使用微信内置地图查看位置
OBEJCT参数说明:

示例代码:
wx.getLocation({
type: 'gcj02', //返回可以用于wx.openLocation的经纬度
success: function(res) { var latitude = res.latitude var longitude = res.longitude
wx.openLocation({
latitude: latitude,
longitude: longitude,
scale: 28
})
}
})Bug & Tip
bug:iOS6.3.30type 参数不生效,只会返回 wgs84 类型的坐标信息tip:wx.getLocation、wx.chooseLocation接口需要用户授权,请兼容用户拒绝授权的场景。