Skip to content

Commit

Permalink
When reversing geocoding on iOS, use original coordinate as result ra…
Browse files Browse the repository at this point in the history
…ther than geocoder result. Resolves #61.
  • Loading branch information
dpa99c committed Apr 19, 2016
1 parent 72e0a43 commit 6deeace
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ios/LaunchNavigator.m
Original file line number Diff line number Diff line change
Expand Up @@ -367,11 +367,11 @@ - (void) reverseGeocode:(NSString*)coords
if (error == nil && [placemarks count] > 0) {
CLPlacemark* geocodedPlacemark = [placemarks lastObject];
NSString* address = [self getAddressFromPlacemark:geocodedPlacemark];
[self logDebug:[NSString stringWithFormat:@"Reverse geocoded coords '%@' to address '%@'", [self coordsToString:geocodedPlacemark.location.coordinate], address]];
[self logDebug:[NSString stringWithFormat:@"Reverse geocoded coords '%@' to address '%@'", [self coordsToString:start_coordinate], address]];
[mapItem setName:address];

MKPlacemark* placemark = [[MKPlacemark alloc]
initWithCoordinate:geocodedPlacemark.location.coordinate
initWithCoordinate:start_coordinate
addressDictionary:geocodedPlacemark.addressDictionary];

successBlock(mapItem, placemark);
Expand Down

0 comments on commit 6deeace

Please sign in to comment.