All examplesRouting
Travel-time areas
An isochrone is the area you can reach from a point within a time budget, returned as a GeoJSON FeatureCollection of polygons. minutes is required, takes up to four values, and each must be 120 or less.
live result
the code that produced it
import { Unmap } from "@unmap/sdk";
const unmap = new Unmap({
key: "um_live_...",
container: "map",
center: [-114.0719, 51.0447],
zoom: 11,
});
const bands = await unmap.router.isochrone([-114.0719, 51.0447], { minutes: [10, 20], mode: "auto" });
unmap.map!.on("load", () => {
unmap.map!.addSource("bands", { type: "geojson", data: bands });
unmap.map!.addLayer({
id: "bands-fill",
type: "fill",
source: "bands",
paint: { "fill-color": "#FF3E9A", "fill-opacity": 0.18 },
});
});The live pane fills the polygons at 18% magenta. In your own map, colour the bands however you like; the response is plain GeoJSON.
const bands = await unmap.router.isochrone([-114.07, 51.05], {
minutes: [10, 20],
mode: "pedestrian",
});The Routing API documents the isochrone endpoint, including the contour limit.