Aakil Ladhani
Aakil Ladhani

Reputation: 982

get route direction between two location

I have to get routing direction i.e. all the lat-long location between two location which i provide. I know below code works for this and give js file in responce.but this code only works when two provided location are not so far. but if two location which are so far suppose between India & Australia then this would be not work and gives nothing in js file. My code is as below.

[NSString* str1 = [NSString stringWithFormat:@"%f,%f", loc1.latitude, loc1.longitude\];
    NSString* str2 = [NSString stringWithFormat:@"%f,%f", loc2.latitude, loc2.longitude\];

    NSString* urlStr = [NSString stringWithFormat:@"http://maps.google.com/maps?output=dragdir&saddr=%@&daddr=%@&output=dragdir", str1, str2\];]

What should i do or I am missing any thing or any filtering is required.Please help me.

-Thanx in advance

Upvotes: 0

Views: 1022

Answers (1)

Hiren
Hiren

Reputation: 12780

Check out first in maps.google.com-> getdirection and check with your location it didn't response because between India and Australia there is no physical root if you check with only land joint country it given correct path so may be it possible same case in iOS..

Upvotes: 2

Related Questions