Working with Directions Settings

Posted on September 30, 2019

Avoid certain way types on the route using the avoidWayTypes property.

let directionsQuery = MPDirectionsQuery.init(originPoint: origin!, destination: destination!)
directionsQuery.avoidWayTypes = ["stairs"]

Set a departure date or an arrival date on the route using the departure or arrival property. It will only make sense to set one of these properties at a time.

let directionsQuery = MPDirectionsQuery.init(originPoint: origin!, destination: destination!)
directionsQuery.departure = Date.init()