Question

i have 200 pois in my app. i want to display the nearest pois to the user within 100 meters range in a mapview. How is this possible?

Was it helpful?

Solution

Iterate over the collection of annotations, and use the distanceFromLocation method of CLLocation to establish how far they are from the device position. If they are within range simply add them.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top