Drawing route on bing maps iPad
Can anyone please guide me how to draw route on bing maps on my iPad?
I got the midway points from http://dev.virtualearth.net/REST/V1/Routes/Walking?wp.0=place1&wp.1=place2&optmz=distance&output=xml&key=key
I receive an xml string that contains the midway latitude and lon开发者_如何学编程gitude. then i just draw lines with that coordinates but it just draws straight lines, i mean not road-by-road please see the screen shot
. How can i achieve this?Thanks,
Try this code
strUrl = [NSString stringWithFormat:@"http://maps.google.com/maps?saddr=%f,%f&daddr=%f,%f",[app.strLat floatValue],[app.strLng floatValue],[app.strDestinationLat floatValue],[app.strDestinationLng floatValue]];
[strUrl retain];
//strUrl=@"http://maps.google.com/mapssaddr=23.032979,72.497921&daddr=25.027923,74.482643";
NSURL *urlTemp =[NSURL URLWithString:strUrl];
NSURLRequest *reqUrl = [NSURLRequest requestWithURL:urlTemp];
[web loadRequest:reqUrl];
精彩评论