打印的信息里没有城市编码,如何才能获取城市编码
uni.getLocation({
geocode:true,
type:'wgs84',
success: (res) => {
console.log(res)
}
})
///返回的内容
{
"type": "GCJ02",
"altitude": 48.51741027832031,
"latitude": 40.04453721788195,
"longitude": 116.2856285264757,
"speed": null,
"accuracy": 2000,
"address": {
"city": "北京市",
"district": "海淀区",
"poiName": "XX大厦",
"province": "北京市",
"street": "东北旺西路",
"streetNum": "30号"
},
"errMsg": "getLocation:ok"
}
8***@qq.com
- 发布:2020-06-04 13:55
- 更新:2020-06-04 15:38
- 阅读:3483
3 个回复
DCloud_App_Array
目前使用的高德和百度定位不包含cityCode
7***@qq.com
来来来
7***@qq.com
现在