开发者

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

Drawing route on bing maps iPad

.

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];
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜