/ Published in: Objective C

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
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(@"%f",dist);
Comments
