地图应用程序建议的不需要的路线

时间:2014-07-09 12:36:02

标签: ios objective-c xcode mapkit

我使用此代码在驾驶模式下为当前位置和所选目的地之间的路线启动地图:

MKPlacemark *placemark = [[MKPlacemark alloc] initWithCoordinate:dest.coordinate addressDictionary:nil];
MKMapItem * destination = [[MKMapItem alloc] initWithPlacemark: placemark];
destination.name = @"Point of interest";
NSArray* items = [[NSArray alloc] initWithObjects: destination, nil];
NSDictionary* options = @{MKLaunchOptionsMapTypeKey : @(MKMapTypeStandard),
                          MKLaunchOptionsDirectionsModeKey: MKLaunchOptionsDirectionsModeDriving};
[MKMapItem openMapsWithItems: items launchOptions: options];

不幸的是,地图建议使用步行路线作为替代方案,如此屏幕截图所示:

Screenshot

有没有办法隐藏这条步行路线?

我定位iOS 7。

0 个答案:

没有答案
相关问题