Im looking to use the getDistanceFrom
method in CoreLocation to determine distance between two points, but i get errors when trying to use CoreLocation...
Im using 3.1.2. I have tried this, but returns an error:
CLLocation *userLoc = [[CLLocation alloc] initWithCoordinate:appDelegate.mapView2.userLocation.coordinate];
CLLocation *poiLoc = [[CLLocation alloc] initWithLatitude: [aPOI.latitude doubleValue] longitude: [aPOI.longitude doubleValue]];
double dist = [userLoc getDistanceFrom:poiLoc] / 1000;
NSLog(@"%d",dist);
error given:
".objc_class_name_CLLocation", referenced from:
literal-pointer@__OBJC@__cls_refs@CLLocation in POIDetailViewController.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
am i missing something? i have imported CoreLocation
...
Is this method deprecated in 3.1.2?
Thanks