NSLog(@"Tap location was %.0f, %.0f", tapPoint.x, tapPoint.y);
NSLog(@"World coordinate was longitude %f, latitude %f", coord.longitude, coord.latitude);
// [self viewDidLoad];
CLLocation *userLoc = mapView.userLocation.location;
CLLocationCoordinate2D userCoordinate = userLoc.coordinate;
mapView.showsUserLocation = YES;
CLLocationCoordinate2D location = [[[mapView userLocation] location] coordinate];
NSLog(@"Location found from Map: %f %f",location.latitude,location.longitude);
mapView.delegate=self;
NSMutableArray* annotations=[[NSMutableArray alloc] init];
// CLLocationCoordinate2D theCoordinate1;
// theCoordinate1.latitude = coord.latitude;
// theCoordinate1.longitude = coord.longitude;
CLLocationCoordinate2D theCoordinate2;
theCoordinate2.latitude = coord.latitude;
theCoordinate2.longitude = coord.longitude;
NSLog(@"user latitude = %f",coord.latitude); // 37.785834
NSLog(@"user longitude = %f",coord.longitude); // -122.406417
MyAnnotation* myAnnotation2=[[MyAnnotation alloc] init];
myAnnotation2.coordinate=theCoordinate2;
myAnnotation2.title =@"Vaibhav";
myAnnotation2.subtitle=@"on a Bridge";
[mapView addAnnotation:myAnnotation2];
[annotations addObject:myAnnotation2];Add a code snippet to your website: www.paste.org