Permalink
Browse files

Starting to think that I'm not doing the right thing to get the location

out of the gmaps geocode result.
  • Loading branch information...
1 parent 7bcef1d commit 20a75fedf7ddcbe929f77d96e94761b78656d3f8 @rickfillion rickfillion committed Mar 17, 2011
Showing with 4 additions and 0 deletions.
  1. +4 −0 Source/Framework/Classes/MKPlacemark+Private.m
@@ -17,9 +17,13 @@ - (id)initWithGoogleGeocoderResult:(NSDictionary *)result
NSNumber *latitudeNumber = [result valueForKeyPath:@"geometry.location.b"];
if (!latitudeNumber)
latitudeNumber = [result valueForKeyPath:@"geometry.location.wa"];
+ if (!latitudeNumber)
+ latitudeNumber = [result valueForKeyPath:@"geometry.location.Ba"];
NSNumber *longitudeNumber = [result valueForKeyPath:@"geometry.location.c"];
if (!longitudeNumber)
longitudeNumber = [result valueForKeyPath:@"geometry.location.ya"];
+ if (!longitudeNumber)
+ longitudeNumber = [result valueForKeyPath:@"geometry.location.Da"];
coordinate.latitude = [latitudeNumber doubleValue];
coordinate.longitude = [longitudeNumber doubleValue];
NSArray *components = [result objectForKey:@"address_components"];

0 comments on commit 20a75fe

Please sign in to comment.