Build isochrone using start point and options
startPointArray<float> start point [lng, lat]optionsObject objectoptions.osrmObject OSRM instanceoptions.radiusnumber distance to draw the buffer as in @turf/bufferoptions.cellSizenumber the distance across each cell as in @turf/point-gridoptions.intervalsArray<number> intervals for isochrones in minutesoptions.deintersectboolean whether or not to deintersect the isochrones. If this is true, then the isochrones will be mutually exclusiveoptions.concavitynumber relative measure of concavity as in concaveman (optional, default2)options.lengthThresholdnumber length threshold as in concaveman (optional, default0)options.unitsstring any of the options supported by turf units (optional, default'kilometers')
const OSRM = require('osrm');
const isochrone = require('isochrone');
const osrm = new OSRM({ path: './monaco.osrm' });
const startPoint = [7.41337, 43.72956];
const options = {
osrm,
radius: 2,
cellSize: 0.1,
intervals: [5, 10, 15],
deintersect: true
};
isochrone(startPoint, options)
.then((geojson) => {
console.log(JSON.stringify(geojson));
});Returns Promise GeoJSON FeatureCollection of Polygons when resolved