Search results for

“geocodeAddressString”

17 results found

Post

Replies

Boosts

Views

Activity

geocodeAddress
Hello,I'm having a bug with the convertion of an NSString (which contains a place from a textfiel input) to a CLLocation.Here is the method supposed to process the convertion:- (void)geoCodeForAddress:(NSString *)address { CLGeocoder *geocoder = [[CLGeocoder alloc] init]; [geocoder geocodeAddressString:address completionHandler:^(NSArray* placemarks, NSError* error){ dispatch_async(dispatch_get_main_queue(), ^{ CLPlacemark *placeMark = [placemarks lastObject]; if (placeMark.location != nil) { self.actionLocation = placeMark.location; } else { self.actionLocation = nil; } if(self.event) [self.tableView reloadData]; }); }];}My problem is, this method returns the wrong location for some specific strings. For instance, whenever I try to use la patache paris as an input, it returns a location in the wrong city though when I try the same exact string in Maps, it's finding the right place.The method geocodeAddressString: completionHandler: is a CoreLocation methods from the CLGeocoder class so there is no w
0
0
416
Jan ’16
geocodeAddress
Hello,I'm having a bug with the convertion of an NSString (which contains a place from a textfiel input) to a CLLocation.Here is the method supposed to process the convertion:- (void)geoCodeForAddress:(NSString *)address { CLGeocoder *geocoder = [[CLGeocoder alloc] init]; [geocoder geocodeAddressString:address completionHandler:^(NSArray* placemarks, NSError* error){ dispatch_async(dispatch_get_main_queue(), ^{ CLPlacemark *placeMark = [placemarks lastObject]; if (placeMark.location != nil) { self.actionLocation = placeMark.location; } else { self.actionLocation = nil; } if(self.event) [self.tableView reloadData]; }); }];}My problem is, this method returns the wrong location for some specific strings. For instance, whenever I try to use la patache paris as an input, it returns a location in the wrong city though when I try the same exact string in Maps, it's finding the right place.The method geocodeAddressString: completionHandler: is a CoreLocation methods from the CLGeocoder class so there is no w
Replies
0
Boosts
0
Views
416
Activity
Jan ’16
Reply to CLGeocoder not working?
It's still not working in Beta 5. I've tried geocodeAddressString and geocodeAddressDictionary. If their completionHandlers return at all, the placemarks array will be nil.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Sep ’15