diff --git a/stadia/geocode_raw.go b/stadia/geocode_raw.go index 821310bf..2c1a5d75 100644 --- a/stadia/geocode_raw.go +++ b/stadia/geocode_raw.go @@ -42,6 +42,9 @@ func (r *RequestGeocodeRaw) SetFocusPoint(x, y float64) { r.FocusPointLat = &y r.FocusPointLng = &x } +func (r RequestGeocodeRaw) endpoint() string { + return "/v1/search" +} func (s *StadiaMaps) GeocodeRaw(ctx context.Context, req RequestGeocodeRaw) (*GeocodeResponse, error) { // https://docs.stadiamaps.com/geocoding-search-autocomplete/search/ var result GeocodeResponse diff --git a/stadia/geocode_structured.go b/stadia/geocode_structured.go index 7aa008dd..935dbd10 100644 --- a/stadia/geocode_structured.go +++ b/stadia/geocode_structured.go @@ -54,7 +54,9 @@ func (r *RequestGeocodeStructured) SetFocusPoint(x, y float64) { r.FocusPointLat = &y r.FocusPointLng = &x } - +func (r RequestGeocodeStructured) endpoint() string { + return "/v1/search/structured" +} func (s *StadiaMaps) GeocodeStructured(ctx context.Context, req RequestGeocodeStructured) (*GeocodeResponse, error) { // https://docs.stadiamaps.com/geocoding-search-autocomplete/structured-search/ // curl "https://api.stadiamaps.com/geocoding/v1/search/structured?address=P%C3%B5hja%20pst%2027a®ion=Harju&country=EE&api_key=YOUR-API-KEY"