Calculate an isochrone from a point
client.Routing.IsochronePost(ctx, body) (*RoutingIsochronePostResponse, error)
POST/api/v1/isochrone
Calculate an isochrone from a point
package main
import (
"context"
"fmt"
"github.com/plazafyi/plaza-go"
"github.com/plazafyi/plaza-go/option"
)
func main() {
client := githubcomplazafyiplazago.NewClient(
option.WithAPIKey("My API Key"),
)
response, err := client.Routing.IsochronePost(context.TODO(), githubcomplazafyiplazago.RoutingIsochronePostParams{
Lat: githubcomplazafyiplazago.F(0.000000),
Lng: githubcomplazafyiplazago.F(0.000000),
Time: githubcomplazafyiplazago.F(0.000000),
})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", 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"
}