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:
parent
8feabbc489
commit
2bb4a134b2
10 changed files with 272 additions and 56 deletions
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue