Browse files

the JSON results that come from the Google Maps API changed the keys,…

… for example, in file UICGRoute.m you are initializing the dictionary that contains the route steps by extracting the value for key "k" - worked the last months, but it seems that the key has been changed to "j" the last days. The same happens with the initialization of the polylines in file UICGPolyline.m, where you initialize the vertices with the value for key "j", but this has been changed to key "g".
  • Loading branch information...
1 parent e533aeb commit 00715ebb80b362c902ebc96cb8dd9371fccc77af @kishikawakatsumi committed Dec 19, 2009
Showing with 3 additions and 3 deletions.
  1. +1 −1 Classes/UICGPolyline.m
  2. +1 −1 Classes/UICGRoute.m
  3. +1 −1 Classes/UICGoogleMapsAPI.m
View
2 Classes/UICGPolyline.m
@@ -25,7 +25,7 @@ - (id)initWithDictionaryRepresentation:(NSDictionary *)dictionary {
if (self != nil) {
dictionaryRepresentation = [dictionary retain];
- vertices = [[dictionaryRepresentation objectForKey:@"j"] retain];
+ vertices = [[dictionaryRepresentation objectForKey:@"g"] retain];
vertexCount = [vertices count];
routePoints = [NSMutableArray arrayWithCapacity:vertexCount];
for (NSDictionary *vertex in vertices) {
View
2 Classes/UICGRoute.m
@@ -30,7 +30,7 @@ - (id)initWithDictionaryRepresentation:(NSDictionary *)dictionary {
self = [super init];
if (self != nil) {
dictionaryRepresentation = [dictionary retain];
- NSDictionary *k = [dictionaryRepresentation objectForKey:@"k"];
+ NSDictionary *k = [dictionaryRepresentation objectForKey:@"j"];
NSArray *stepDics = [k objectForKey:@"Steps"];
numerOfSteps = [stepDics count];
steps = [[NSMutableArray alloc] initWithCapacity:numerOfSteps];
View
2 Classes/UICGoogleMapsAPI.m
@@ -38,7 +38,7 @@ - (void)makeAvailable {
}
- (void)webView:(UIWebView *)webView runJavaScriptAlertPanelWithMessage:(NSString *)message initiatedByFrame:(id)frame {
- NSLog(@"%@", message);
+// NSLog(@"%@", message);
id JSONValue = [message JSONValue];
if (!JSONValue) {
if ([self.delegate respondsToSelector:@selector(goolgeMapsAPI:didFailWithMessage:)]) {

0 comments on commit 00715eb

Please sign in to comment.