1

In my map i need to display the locations which i am getting from a xml which are currently in a 200 mile radius from my current location. I have never done this thing before can you please suggest a way.

Thanks,

Ashutosh
  • 5,614
  • 13
  • 52
  • 84

2 Answers2

2

Look into CoreLocation. Particularly, the method distanceFromLocation: of the CLLocation class will prove useful to find nearby locations. Use CLLocationManager to find out the current location.

Since you will most likely retrieve latitudes and longitudes from your XML, CLLocations initWithLatitude:longitude: will be handy to initialize CLLocation objects that you can later pass to distanceFromLocation:.

albertamg
  • 28,492
  • 6
  • 64
  • 71
1

This will be the best site you ever visit http://www.raywenderlich.com/2847/introduction-to-mapkit-on-ios-tutorial

Armand
  • 9,847
  • 9
  • 42
  • 75