开发者

iphone iOS mapkit, filter a list of points(Longitude, Latitude) by Nearest

I have a list of points of开发者_高级运维 interest in a plist file containing point info + longitude & latitude.

I wonder how to show in a MapView the nearest points to me according to a radius ?

example : radius = 2km --> show the top 20 nearest pins to my location


Calculate the distance between your position and the points then sort and filter the results.

To calculate the distance use distanceFromLocation

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜