Reverse geocode a coordinate
client.Geocode.Reverse(ctx, query) (*ReverseGeocodeResult, error)
GET/api/v1/geocode/reverse
Reverse geocode a coordinate
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"),
)
reverseGeocodeResult, err := client.Geocode.Reverse(context.TODO(), githubcomplazafyiplazago.GeocodeReverseParams{
Lat: githubcomplazafyiplazago.F(0.000000),
Lng: githubcomplazafyiplazago.F(0.000000),
})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", reverseGeocodeResult.Features)
}