I use MapKit and MKDirections for driving directions. The error "Directions Not Available" appears when the two points (A and B) are outside mainland China (e.g. Tokyo → Osaka). For routes inside China (e.g. Shanghai → Beijing), the same code works.
let req = MKDirections.Request()
req.source = MKMapItem(placemark: MKPlacemark(coordinate: origin))
req.destination = MKMapItem(placemark: MKPlacemark(coordinate: destination))
req.transportType = .automobile
MKDirections(request: req).calculate { response, error in
// Tokyo–Osaka (outside China): "Directions Not Available"
// Shanghai–Beijing (inside China): works
}
Questions:
- Is MKDirections intended to support only routes within the device’s region (e.g. China)? When A/B are abroad, is "Directions Not Available" expected? Is this documented?
- For cross-country or overseas routes (e.g. Tokyo–Osaka), what is the recommended approach—third-party routing API + drawing on MapKit?
Thanks.