Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/objective-c/22.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Objective c 如何用两点Xcode绘制步行路线_Objective C_Xcode_Routes_Cllocation_Polyline - Fatal编程技术网

Objective c 如何用两点Xcode绘制步行路线

Objective c 如何用两点Xcode绘制步行路线,objective-c,xcode,routes,cllocation,polyline,Objective C,Xcode,Routes,Cllocation,Polyline,如何通过两点(起点和终点)绘制步行路线。 我不会使用多段线。请检查以下教程,也请检查,希望对您有所帮助 你不允许在你的应用程序中使用谷歌方向。您可以这样做的唯一方法是将它们发送到google maps应用程序,如下所示: - (void)getDirections { CLLocationCoordinate2D start = { (startLatitude), (startLongitude) }; CLLocationCoordinate2D end = { (endLatitude),

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

请检查以下教程,也请检查,希望对您有所帮助

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

- (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]];
}