0

如何通过两点(起点和终点)绘制步行路线。我不会使用折线。

4

1 回答 1

1

请查看以下教程在两点之间绘制路线还查看Apple 的 BreadCrumb 示例,希望对您有所帮助!

你不能在你的应用程序中使用谷歌方向。您可以这样做的唯一方法是将它们发送到谷歌地图应用程序,如下所示:

- (void)getDirections {
CLLocationCoordinate2D start = { (startLatitude), (startLongitude) };
CLLocationCoordinate2D end = { (endLatitude), (endLongitude) };

NSString *googleMapsURLString = [NSString stringWithFormat:@"http://maps.google.com/?saddr=%1.6f,%1.6f&daddr=%1.6f,%1.6f&dirflg=w", start.latitude, start.longitude, end.latitude, end.longitude];

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:googleMapsURLString]];

}

于 2013-04-03T05:48:05.443 回答