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