Calculate an isochrone from a point
client.routing.isochronePost(RoutingIsochronePostParams { lat, lng, time, 7 more } params, RequestOptionsoptions?): RoutingIsochronePostResponse { features, geometry, properties, type }
POST/api/v1/isochrone
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 response = await client.routing.isochronePost({
lat: 0,
lng: 0,
time: 0,
});
console.log(response.features);{
"features": [
{
"geometry": {
"coordinates": [
2.3522,
48.8566
],
"type": "Point"
},
"properties": {
"@id": "bar",
"@type": "bar",
"amenity": "bar",
"cuisine": "bar",
"name": "bar"
},
"type": "Feature",
"id": "node/21154906"
}
],
"geometry": {
"coordinates": [
2.3522,
48.8566
],
"type": "Point"
},
"properties": {
"area_m2": 0,
"max_cost_s": 0,
"mode": "auto",
"time_seconds": 0,
"vertices_reached": 0
},
"type": "Feature"
}Returns Examples
{
"features": [
{
"geometry": {
"coordinates": [
2.3522,
48.8566
],
"type": "Point"
},
"properties": {
"@id": "bar",
"@type": "bar",
"amenity": "bar",
"cuisine": "bar",
"name": "bar"
},
"type": "Feature",
"id": "node/21154906"
}
],
"geometry": {
"coordinates": [
2.3522,
48.8566
],
"type": "Point"
},
"properties": {
"area_m2": 0,
"max_cost_s": 0,
"mode": "auto",
"time_seconds": 0,
"vertices_reached": 0
},
"type": "Feature"
}