我一直在iOS5中繪製路線,但由於應用程序必須升級到iOS6,因此不允許在座標位置之間繪製路線。我搜查了很多,但最終沒有成功。任何人都可以幫助我哪些api在iOS6中使用,因爲谷歌地圖不支持了嗎?如何在地圖中繪製路線,ios6?
編輯:我已經使用谷歌iOS SDK以前繪製的路線,將自動照顧多義線。據我搜索,我將能夠重定向到瀏覽器顯示路線和導航。但我需要繪製這個應用程序[iOS6]。 iOS6是否會自動執行路由,如果有的話,可以共享一些代碼來獲取它的要點。此代碼示例我在iOS5中使用Google地圖
// over lay map to draw route
routeOverlayView = [[UICRouteOverlayMapView alloc] initWithMapView:routeMapView];
diretions = [UICGDirections sharedDirections];
UICGDirectionsOptions *options = [[UICGDirectionsOptions alloc] init];
//setting travel mode to driving
options.travelMode = UICGTravelModeDriving;
[diretions loadWithStartPoint:startPoint endPoint:endPoint options:options];
// Overlay polylines
UICGPolyline *polyline = [directions polyline];
NSArray *routePoints = [polyline routePoints];
NSLog(@"routePoints %@",routePoints);
[routeOverlayView setRoutes:routePoints];
你如何繪製你的路線?因爲雖然Apple在iOS 6中更改了地圖提供程序,但折線的繪製方式幾乎相同。也許提供一些代碼給我們看看? – lxt
更新了我的問題 – sahasra