To find the closest place among the selected data, you need to calculate the distance from the current location to each location that you have. And then just sort this data and you will get the closest location from the existing coordinate map.
Below is the method for determining the distance ...
-(float)kilometresBetweenPlace1:(CLLocationCoordinate2D) currentLocation andPlace2:(CLLocationCoordinate2D) place2 { CLLocation *userLoc = [[CLLocation alloc] initWithLatitude:currentLocation.latitude longitude:currentLocation.longitude]; CLLocation *poiLoc = [[CLLocation alloc] initWithLatitude:place2.latitude longitude:place2.longitude]; CLLocationDistance dist = [userLoc getDistanceFrom:poiLoc]/(1000*distance); NSString *strDistance = [NSString stringWithFormat:@"%.2f", dist]; NSLog(@"%@",strDistance); return [strDistance floatValue]; }
source share