需求呢,是根据经纬度查附近的地点什么的,小程序自带的map组件又没有这个功能,然后就接入了腾讯地图… poi_options呢是这个方法的请求参数之一,看下文档:
有取值范围啊、page啊什么的,这里要说的是怎么给poi_options
赋值…
poi_options: 'policy=2;radius=3000;page_size=20;page_index=1',
qqmapsdk.reverseGeocoder({
location: {
latitude: that.data.myLatitude,
longitude: that.data.myLongitude
},
get_poi: 1,
poi_options: 'policy=2;radius=3000;page_size=20;page_index=1',
success: function(res) {
console.log(res);
that.setData({
addressList: res.result.pois
})
},
fail: function(res) {
console.log(res);
},
complete: function(res) {
console.log(res);
}
});
扫码关注腾讯云开发者
领取腾讯云代金券
Copyright © 2013 - 2025 Tencent Cloud. All Rights Reserved. 腾讯云 版权所有
深圳市腾讯计算机系统有限公司 ICP备案/许可证号:粤B2-20090059 深公网安备号 44030502008569
腾讯云计算(北京)有限责任公司 京ICP证150476号 | 京ICP备11018762号 | 京公网安备号11010802020287
Copyright © 2013 - 2025 Tencent Cloud.
All Rights Reserved. 腾讯云 版权所有