Skip to content
GuidesPlaygroundDashboard

Calculate an isochrone from a point

client.routing.isochrone(RoutingIsochroneParams { lat, lng, time, mode } query, RequestOptionsoptions?): GeoJsonFeature { geometry, properties, type, 2 more }
GET/api/v1/isochrone

Calculate an isochrone from a point

ParametersExpand Collapse
query: RoutingIsochroneParams { lat, lng, time, mode }
lat: number

Latitude

lng: number

Longitude

time: number

Travel time in seconds (1-7200)

mode?: string

Travel mode (auto, foot, bicycle)

ReturnsExpand Collapse
GeoJsonFeature { geometry, properties, type, 2 more }
geometry: GeoJsonGeometry { coordinates, type }
coordinates: Array<number> | Array<Array<number>> | Array<Array<Array<number>>> | Array<Array<Array<Array<number>>>>

GeoJSON coordinates array (nesting depth varies by geometry type)

One of the following:
Array<number>
Array<Array<number>>
Array<Array<Array<number>>>
Array<Array<Array<Array<number>>>>
type: "Point" | "LineString" | "Polygon" | 3 more
One of the following:
"Point"
"LineString"
"Polygon"
"MultiPoint"
"MultiLineString"
"MultiPolygon"
properties: Record<string, unknown>
type: "Feature"
id?: string

Feature identifier (type/osm_id)

osm_id?: number

OpenStreetMap ID

Calculate an isochrone from a point

import Plaza from '@plazafyi/sdk';

const client = new Plaza({
  apiKey: process.env['PLAZA_API_KEY'], // This is the default and can be omitted
});

const geoJsonFeature = await client.routing.isochrone({
  lat: 0,
  lng: 0,
  time: 0,
});

console.log(geoJsonFeature.id);
Returns Examples