3

My question is about the getting the multiple locations from #CLLocation manager and how to make the x and y axis in the objective C.

Aashoo
  • 33
  • 3
  • i m getting the latitude and longitude of only one point. i want to get the points of the multiple locations which is searched by the user – Aashoo Oct 02 '15 at 12:46

1 Answers1

1

all location stored at delegates method:

- (void)locationManager:(CLLocationManager *)manager 
    didUpdateToLocation:(CLLocation *)newLocation 
           fromLocation:(CLLocation *)oldLocation

The delegate above is deprecated in iOS 6. Now the following should be used:

- (void)locationManager:(CLLocationManager *)manager 
     didUpdateLocations:(NSArray *)locations

In order to get the last position, simply get the last object of the array:

[locations lastObject]
Ofir Malachi
  • 1,145
  • 14
  • 20