Add centroid information when geocoding

I would use the boundary rect, but I'm getting a 500-level error from
stadia maps
This commit is contained in:
Eli Ribble 2026-02-25 16:08:32 +00:00
parent 8feabbc489
commit 2bb4a134b2
No known key found for this signature in database
10 changed files with 272 additions and 56 deletions

View file

@ -1,18 +1,9 @@
package stadia
type Error struct {
ErrorMessage string `json:"error"`
Errors []string `json:"errors"`
}
func (e *Error) Error() string {
return e.ErrorMessage
}
// GeocodeResponse represents the top-level response from the geocoding API
type GeocodeResponse struct {
BBox []float64 `json:"bbox"` // [W, S, E, N]
ErrorMessage string `json:"error"`
ErrorMessage string `json:"error,omitempty"`
Features []GeocodeFeature `json:"features"`
Geocode GeocodeMeta `json:"geocoding"`
Type string `json:"type"` // Should be "FeatureCollection"