更新记录
1.0.0(2023-03-12) 下载此版本
制作原因
uni.chooseLocation()不支持谷歌地图POI搜索
使用方法
注意
manifest.json 打开定位
引入组件
<genos-googlemap ref="googlemap" googleKey="谷歌KEY" lang="cn" @confirmAddress="confirmAddress"></genos-googlemap>
打开弹窗
this.$refs.googlemap.open();
接收返回
confirmAddress(e){
console.log(e);
}
参数说明
| 参数 | 默认 | 说明 |
|---|---|---|
| googleKey | 谷歌地图官方web key | |
| lang | cn | https://developers.google.com/maps/faq?hl=zh-cn#languagesupport |
返回说明
{
"compound_code": "中国北京市海淀区",
"latlng": {
"lat": 39.986913000000001,
"lng": 116.30587389999999
},
"name": "北京大学"
}
| 参数 | 说明 |
|---|---|
| compound_code | 行政区划 |
| latlng | 经纬度 |
| name | 名称 |

收藏人数:
下载插件并导入HBuilderX
下载示例项目ZIP
赞赏(5)
下载 472
赞赏 5
下载 11032259
赞赏 1800
赞赏
京公网安备:11010802035340号