Distance Matrix Service

The MapAnything Routing Engine (MARE) Distance Matrix Service takes a set of locations and provides estimates for the travel times and distances between each pair. Specifically, it returns detailed travel time estimates that account for predicted traffic based on years of historical data. The travel times are returned for multiple “traffic windows,” time periods during which predicted traffic remains roughly constant. The MARE Distance Matrix Service is designed to be very fast in order to handle large requests that include hundreds, even thousands of locations. The current performance can be orders of magnitude faster than competing services.

If passed a set of n locations, the returned matrix defaults to a square n × n matrix where each entry in the matrix is a vector representing the travel time between two locations at different times of day. However, the service also allows you to filter the results based on the specifics of your use case. For example, you can designate that some locations are sources and others are destinations so that the result contains only information about traveling from a source location to a destination location. MARE supports a variety of other options that allow the user to filter the matrix. By default, MARE assumes the vehicle type to be “car”. However, the API also allows you to specify bicycle, pedestrian, and truck with additional parameters around weight and height. Due to the rich feature set offered by MARE, we provide multiple examples in order to describe of as much of the functionality as possible.

MARE Matrix API calls can be synchronous or asynchronous. Synchronous calls are for smaller requests (less than 200 locations) and are processed immediately. Asynchronous calls are for a larger set of locations. The payload for asynchronous and synchronous calls are the same. However, an asynchronous call will return a URI to retrieve the job. Once it completes, the response will be purged after 24 hours.


Method: POST