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
精彩评论