views:

59

answers:

1

Hello People,

i am implementing an app, that show customers and my userLocation on a map. But now i have a problem, because there are a lot of costumers and the map is very uncomfortable.

How can i only see pins on a map or in a list, that are around 100 kilometers away from me?

I hope someone could help me?

Greetings Marco

+1  A: 

you should cache your current location in a CLLocation* variable. You have to calculate the distance of every pin (annotation) you add from this location using [myLoc getDistanceFrom:pinLoc] which returns a CLLocationDistance i believe. If this is > 100 kms don't add it to your map.

Mugunth Kumar