1

我无法使用 Apple Map 应用程序获取步行路线,但是如果使用MKLaunchOptionsDirectionsModeDriving而不是MKLaunchOptionsDirectionsModeWalking代码有效,有人可以帮我了解步行路线吗?

我有以下用于获取路线的代码,适用于驾驶案例...

MKPlacemark* place = [[MKPlacemark alloc] initWithCoordinate:_targetLocation addressDictionary:nil];
MKMapItem* destination = [[MKMapItem alloc] initWithPlacemark:place];
destination.name = [lastParkingInfo streetAddress];
NSArray* items = [[NSArray alloc] initWithObjects: destination, nil];
NSDictionary* options = [[NSDictionary alloc] initWithObjectsAndKeys:MKLaunchOptionsDirectionsModeDriving,MKLaunchOptionsDirectionsModeKey, nil];
[MKMapItem openMapsWithItems:items launchOptions:options];
4

0 回答 0