对前不久写的定位周边信息进行了小优化
模拟机上的效果图,没法定位,讲究着看大致就是这样。

1.初始化地图和搜索。在自己设置一个大头针添加在地图的最中间。在设置一个返回中间大头针的按钮。这些自己设置。

2.当定位成功后会进行这个回调方法实时获得用户的经纬度

3.根据中心点坐标来搜周边的POI和改变位置是搜索周边POI



3.最后在回调方法中把poi搜到的地址存到数组中,刷新tableview即可

对前不久写的定位周边信息进行了小优化
模拟机上的效果图,没法定位,讲究着看大致就是这样。
1.初始化地图和搜索。在自己设置一个大头针添加在地图的最中间。在设置一个返回中间大头针的按钮。这些自己设置。
2.当定位成功后会进行这个回调方法实时获得用户的经纬度
3.根据中心点坐标来搜周边的POI和改变位置是搜索周边POI
3.最后在回调方法中把poi搜到的地址存到数组中,刷新tableview即可
本文标题:iOS高德地图定位及显示周边信息简单介绍
本文链接:https://www.haomeiwen.com/subject/anhtuttx.html
网友评论