Quantcast
Channel: maps for developers - Medium
Viewing all articles
Browse latest Browse all 2230

Truck routing is live

$
0
0

Optimize your route with vehicle specifications in mind

By: Amy Ghate

Truck routing is now live in the Directions API, allowing you to specify the weight, height, width, length, axle load, and payload of your vehicle at request time. Based on your specifications, the API will respond with a route that takes the applicable restrictions and clearances into account. Your route will automatically avoid roads where trucks are prohibited and areas that are impassable dependent on vehicle.

With route in hand, you can use the Directions API to generate turn-by-turn directions or the Matrix API to request bulk ETAs to help solve optimization problems.

Getting started with a truck routing request is a simple HTTP request. URLs follow this pattern:

https://api.mapbox.com/valhalla/v1/route?json=<your json configuration>&access_token=<your access token>

For JSON configuration, use the following:

In the configuration above, we’ve requested a route in Downingtown, PA for a typical truck in the US that is 4.11 meters high, 2.6 meters wide, 21.64 meters long, 21.77 metric tons, and has an axle load of 9.07 metric tons.

Making a request with this configuration avoids a well known low-clearance bridge know by locals as “the can opener” because of its tendency to pry off the tops of trucks like the lid of a can and instead sends vehicles on a substantial detour, that takes 12 times longer than the car route. That kind of change has a significant impact on decision-making when optimizing deliveries, and saves users from making costly mistakes.

We’re offering truck routing in beta. During the beta period, we’ll be releasing new features to the API, adding support for the Navigation SDK, and using your feedback and data collected from sources like the Vision SDK to continuously improve our knowledge of truck restrictions, clearances, and weight limits.

Email me at amy.ghate@mapbox.com to get early access to the API and start building.

Amy Ghate


Truck routing is live was originally published in Points of interest on Medium, where people are continuing the conversation by highlighting and responding to this story.


Viewing all articles
Browse latest Browse all 2230

Trending Articles