Reputation: 127
I am obtaining the users location via Parse and the object is returned as a PFGeoPoint. I have converted it to a CLLocation / CLLocationCoordinate2D by doing so:
CLLocation *loc = [[CLLocation alloc] initWithLatitude:self.geoPoint.latitude longitude:self.geoPoint.longitude];
CLLocationCoordinate2D coordinate = [loc coordinate];
Question is to add an annotation on a mapView it appears I need a MKPointAnnotation. How would I go about converting what I have to be able to add it to my mapView?
Upvotes: 0
Views: 693
Reputation: 12109
You can create a MKPointAnnotation for a specific location this way:
MKPointAnnotation *annotation = [[MKPointAnnotation alloc] init];
annotation.coordinate = coordinate;
This annotation can then be added to the map view.
[mapView addAnnotation:annotation];
Upvotes: 3