Avoid service roads for trucks
Implement Using: Distance Matrix Flexible API
In this example, let’s request for distance and duration values for a route that a truck can take while avoiding service roads. We will create a Distance Matrix Flexible request with 2 origins (O) and 2 destinations (D). We set option as flexible along with:
- setting
modeto “truck” to get distance and duration values for a route that a truck can take avoidoption set to “service_road”