Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

  • Loading branch information...
commit d27b52babdf093533e4e58339ce3c47c0eec70ba 1 parent 6ed424c
@kishikawakatsumi authored
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];
Please sign in to comment.
Something went wrong with that request. Please try again.