Find features near a geographic point
client.Elements.Nearby(ctx, query) (*FeatureCollection, error)
GET/api/v1/features/nearby
Find features near a geographic 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"),
)
featureCollection, err := client.Elements.Nearby(context.TODO(), githubcomplazafyiplazago.ElementNearbyParams{
Lat: githubcomplazafyiplazago.F(0.000000),
Lng: githubcomplazafyiplazago.F(0.000000),
})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", featureCollection.Features)
}