2

谁能指导我如何在 iPad 上的 bing 地图上绘制路线?

我从http://dev.virtualearth.net/REST/V1/Routes/Walking?wp.0=place1&wp.1=place2&optmz=distance&output=xml&key=key

我收到一个包含中间纬度和经度的 xml 字符串。然后我只是用那个坐标画线,但它只是画直线,我的意思是不是逐路请看屏幕截图
在此处输入图像描述
我怎样才能做到这一点?

谢谢,

4

1 回答 1

2

试试这个代码

   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];
于 2011-09-06T13:40:43.477 回答