Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Walking travel mode fixed #9

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 8 additions & 2 deletions Classes/UICGRoute.m
Expand Up @@ -30,8 +30,14 @@ - (id)initWithDictionaryRepresentation:(NSDictionary *)dictionary {
self = [super init]; self = [super init];
if (self != nil) { if (self != nil) {
dictionaryRepresentation = [dictionary retain]; dictionaryRepresentation = [dictionary retain];
NSArray *allKeys = [dictionaryRepresentation allKeys]; NSDictionary *k;
NSDictionary *k = [dictionaryRepresentation objectForKey:[allKeys objectAtIndex:[allKeys count] - 1]]; for(NSString *key in [dictionaryRepresentation allKeys]){
if ([[dictionaryRepresentation objectForKey:key] isKindOfClass:[NSDictionary class]] &&
[[dictionaryRepresentation objectForKey:key] objectForKey:@"Steps"]) {
k = [dictionaryRepresentation objectForKey:key];
}
}
NSLog(@"K %@", k);
NSArray *stepDics = [k objectForKey:@"Steps"]; NSArray *stepDics = [k objectForKey:@"Steps"];
numerOfSteps = [stepDics count]; numerOfSteps = [stepDics count];
steps = [[NSMutableArray alloc] initWithCapacity:numerOfSteps]; steps = [[NSMutableArray alloc] initWithCapacity:numerOfSteps];
Expand Down
2 changes: 1 addition & 1 deletion api.html
Expand Up @@ -13,7 +13,7 @@


function initialize() { function initialize() {
if (GBrowserIsCompatible()) { if (GBrowserIsCompatible()) {
gdir = new GDirections(null, null); gdir = new GDirections(null, "body");
geocoder = new GClientGeocoder(); geocoder = new GClientGeocoder();


GEvent.addListener(gdir, "load", onGDirectionsLoad); GEvent.addListener(gdir, "load", onGDirectionsLoad);
Expand Down