Isochrone
On this page
How far you can get from a point in a given time or distance, for driving
(with or without live traffic), walking, or cycling, from the
Isochrone API. The
command also takes the common flags — --username/-u, --token/-t,
--profile, --id — described in
Shared parameters.
mapbox isochrone
A GeoJSON FeatureCollection with one contour per value in
--contours-minutes or --contours-meters, around a single center point.
Exactly one of those two is required; the CLI doesn't check this before
sending, and the API answers 422 if you pass both or neither.
Parameters:
| Parameter | Description |
|---|---|
<routing-profile> | Required. mapbox/driving-traffic (accounts for live traffic), mapbox/driving, mapbox/walking, or mapbox/cycling. Sent as typed rather than checked against a list, since some accounts have additional profiles of their own. |
<coordinates> | Required. The center point, one {longitude},{latitude} pair. |
--contours-minutes | Up to 4 times in minutes, 1-60, comma-separated and increasing. One contour per value. |
--contours-meters | Up to 4 distances in meters, 1-100000, comma-separated and increasing. One contour per value. |
--contours-colors | A hex color per contour, without #, comma-separated. Must match the number of contours. |
--polygons | Return each contour that forms a ring as a GeoJSON polygon instead of a linestring. A contour that doesn't form a ring stays a linestring. |
--denoise | 0 to 1; a larger value removes more of the smaller contours. 1 keeps only the largest contour for each level. Defaults to 1. |
--generalize | Douglas-Peucker simplification tolerance in meters. A higher value gives a coarser contour. |
--exclude | Road types to route around, comma-separated: motorway, toll, ferry, unpaved, cash_only_tolls. mapbox/driving and mapbox/driving-traffic only. |
--depart-at | Departure time, ISO 8601; the contours reflect traffic conditions at that time. Defaults to now, in the center point's own time zone. |
Examples:
mapbox isochrone mapbox/driving "-122.42,37.78" --contours-minutes 5,10,15
mapbox isochrone mapbox/walking "-122.42,37.78" --contours-minutes 5,10 --polygons
mapbox isochrone mapbox/cycling "-122.42,37.78" --contours-meters 1000,5000 \
--contours-colors ff0000,0000ff
Was this page helpful?