小程序内置地图调用并但显示VM61:1 无效的 appJSON["perm?
发布于 7 年前 作者 xuegang 813 次浏览 来自 官方Issues

JS代码.

map: function () {

wx.getLocation({

type: ‘gcj02’, // 默认为 wgs84 返回 gps 坐标,gcj02 返回可用于 wx.openLocation 的坐标

success: function (res) {

// success

wx.openLocation({

latitude: 22.9057700000, // 纬度,范围为-90~90,负数表示南纬

longitude: 114.0034500000, // 经度,范围为-180~180,负数表示西经

scale: 28, // 缩放比例  

name: ‘东莞市黄江镇’,

address: ‘东莞市黄江镇合路村’,

全局声明

“permission”:{

“scope.userLoaction”:{

“desc”:“你的位置信息将用于小程序位置接口的效果展示”

}

},

1 回复

麻烦提供出现问题的具体机型、微信版本号、系统版本号,以及能复现问题的代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html

回到顶部