uniapp实现逆解析地址(经纬度换具体地址)

调用高德地图的sdk

// #ifndef H5
				this.qqmapsdk.reverseGeocoder({
					get_poi: 1,
					poi_options: `address_format=short;policy=1;radius=3000;page_size=20;page_index=1;category=${this.category}`,
					location: {
						latitude: this.lat,
						longitude: this.lng
					},
					success: res => {
						let data = res.result.pois || [];
						this.getResult(data)
					},
					fail: res => {
						this.loading = false;
						this.tui.toast('获取位置信息失败,请检查是否打开位置权限!');
					}
				})
				// #endif

文档:https://lbs.qq.com/service/webService/webServiceGuide/webServiceGcoder


版权声明:本文为m0_46365130原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。