Request format

https://distancematrix.api.mappable.world/v2/
  ? apikey=<string>
  & origins=<lon1,lat1|lon2,lat2|...>
  & destinations=<lon1,lat1|lon2,lat2|...>
  & [mode=<string>]
  & [departure_time=<integer>]
  & [avoid_tolls=<boolean>]
  & [avoid_zones=<lon1,lat1|lon2,lat2|...>&avoid_zones=<lon1,lat1|lon2,lat2|...>]
  & [traffic=<string>]
  & [weight=<float>]
  & [axle_weight=<float>]
  & [max_weight=<float>]
  & [height=<float>]
  & [width=<float>]
  & [length=<float>]
  & [payload=<float>]
  & [eco_class=<integer>]
  & [has_trailer=<boolean>]

All params

apikey

Required parameter

The key issued in the Mappable Account.

Note

Key activation takes up to 15 minutes.

origins

Required parameter

The origin points for routes specified in decimal degrees. Routes are created from each origin point to all of the destinations.
Each point is defined as a coordinate pair in the format: <longitude,latitude>
Coordinate pairs (points) are separated by the pipe symbol (|).

Maximum number of points per request: 100.

Note

The maximum size of the matrix is 100 items. For example, you can specify 10 origins and 10 destinations in a single request, but you can't specify 50 origins with 10 destinations, because the resulting matrix will contain 500 items.

destinations

Required parameter

The destination points of routes specified in decimal degrees.
Each point is defined as a coordinate pair in the format: <longitude,latitude>
Coordinate pairs (points) are separated by the pipe symbol (|).

Maximum number of points per request: 100.

Note

The maximum size of the matrix is 100 items. For example, you can specify 10 origins and 10 destinations in a single request, but you can't specify 50 origins with 10 destinations, because the resulting matrix will contain 500 items.

mode

Type of travel on the route. Acceptable values:

  • driving: Passenger car route. Used by default.
  • truck: Truck route.
  • walking: Walking route.
  • transit: Public transit route.
  • bicycle: Bicycle route.
  • scooter: Electric scooter route.

departure_time

The departure time in UNIX time. Used for calculating the expected traffic congestion. If this parameter is omitted, the traffic forecast is made for the time of request processing.
This value can't be in the past.

Warning

This parameter is not used when calculating routes:

  • for walking, bicycle or electric scooter (mode=walking, mode=bicycle or mode=scooter),
  • without traffic jams (traffic=disabled).

avoid_tolls

No toll roads. When true, the route avoids toll roads. Default value: false (only for mode=driving or mode=truck).

avoid_zones

Set up a custom polygon on the map to avoid it during routing. You can set up multiple polygons in the request. Each polygon should has at least 3 points (only for mode=driving or mode=truck).

traffic

Change the type of road traffic. When disabled, the route is built according to the shortest distance, without traffic jams (only for mode=driving or mode=truck).

weight

Vehicle weight in tons (only for mode=truck).

axle_weight

Actual vehicle axle load in tons (only for mode=truck).

max_weight

Maximum allowed vehicle weight in tons (only for mode=truck).

height

Vehicle height in meters (only for mode=truck).

width

Vehicle width in meters (only for mode=truck).

length

Vehicle length in meters (only for mode=truck).

payload

Maximum vehicle load capacity in tons (only for mode=truck).

eco_class

Vehicle emission standard (only for mode=truck).

has_trailer

Trailer (only for mode=truck). Default value: false.