Make structured and raw geocodes work for bulk geocoding
This commit is contained in:
parent
7a0fe04768
commit
3a28151b09
2 changed files with 6 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue