如何在当前位置和另一个位置之间绘制路线

时间:2014-02-07 12:48:43

标签: ios iphone mkmapview

在我的应用程序中,我必须使用Map工具包框架显示当前位置和指定客户端位置之间的路径。

3 个答案:

答案 0 :(得分:1)

使用Google地图..

我们可以使用下面的代码

NSString* url = [NSString stringWithFormat: @"http://maps.google.com/maps?//saddr=Current+Location&daddr=42.889,-77.2803"];
        [[UIApplication sharedApplication] openURL: [NSURL URLWithString: url]];

希望有所帮助......

答案 1 :(得分:0)

你可以参考这个链接,这段代码正是你想要的......

https://github.com/lukagabric/LRouteController

答案 2 :(得分:0)

您可以参考下面的网址,其中有一个很好的示例代码:

https://github.com/kadirpekel/MapWithRoutes