Skip to content
Browse files

Google Maps API changed the keys for root and polyline objects.

  • Loading branch information...
1 parent 6ed424c commit d27b52babdf093533e4e58339ce3c47c0eec70ba @kishikawakatsumi committed Jan 17, 2010
Showing with 4 additions and 3 deletions.
  1. +1 −1 Classes/UICGDirections.m
  2. +1 −1 Classes/UICGPolyline.m
  3. +2 −1 Classes/UICGRoute.m
View
2 Classes/UICGDirections.m
@@ -34,7 +34,7 @@ - (id)init {
self = [super init];
if (self != nil) {
googleMapsAPI = [[UICGoogleMapsAPI alloc] init];
- googleMapsAPI.delegate =self;
+ googleMapsAPI.delegate = self;
}
return self;
}
View
2 Classes/UICGPolyline.m
@@ -25,7 +25,7 @@ - (id)initWithDictionaryRepresentation:(NSDictionary *)dictionary {
if (self != nil) {
dictionaryRepresentation = [dictionary retain];
- vertices = [[dictionaryRepresentation objectForKey:@"g"] retain];
+ vertices = [[dictionaryRepresentation objectForKey:[[dictionaryRepresentation allKeys] objectAtIndex:4]] retain];
vertexCount = [vertices count];
routePoints = [NSMutableArray arrayWithCapacity:vertexCount];
for (NSDictionary *vertex in vertices) {
View
3 Classes/UICGRoute.m
@@ -30,7 +30,8 @@ - (id)initWithDictionaryRepresentation:(NSDictionary *)dictionary {
self = [super init];
if (self != nil) {
dictionaryRepresentation = [dictionary retain];
- NSDictionary *k = [dictionaryRepresentation objectForKey:@"j"];
+ NSArray *allKeys = [dictionaryRepresentation allKeys];
+ NSDictionary *k = [dictionaryRepresentation objectForKey:[allKeys objectAtIndex:[allKeys count] - 1]];
NSArray *stepDics = [k objectForKey:@"Steps"];
numerOfSteps = [stepDics count];
steps = [[NSMutableArray alloc] initWithCapacity:numerOfSteps];

0 comments on commit d27b52b

Please sign in to comment.
Something went wrong with that request. Please try again.