2013-03-25 26 views

回答

1

請檢查以下教程Draw Route Between two points另請檢查BreadCrumb example of Apple希望它對您有所幫助!

您的應用內不允許使用Google方向。你可以做到這一點的唯一方法就是把它們發送到谷歌地圖應用程序按:

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

}

相關問題