È possibile convertire PFGeoPoint con Parse su CLLocation?Come convertire PFGeoPoint in CLLocation
Ragione di essere sto cercando di ottenere i nomi dei luoghi da PFGeoPoint in questo modo:
CLGeocoder *geocoder;
CLPlacemark *placemark;
PFGeoPoint *point = [object objectForKey:@"location"];
[geocoder reverseGeocodeLocation:point completionHandler:^(NSArray *placemarks, NSError *error) {
NSLog(@"Found placemarks: %@, error: %@", placemarks, error);
if (error == nil && [placemarks count] > 0)
{
placemark = [placemarks lastObject];
NSLog(@"%@", placemarks);
}
}];
errore che ottengo è ovviamente:
Incompatiable pointer types sending 'PFGeoPoint *' to parameter of type 'CLLocation *'