Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Address ¶
type Address struct { Title string `json:"title"` ID string `json:"id"` ResultType string `json:"resultType"` HouseNumberType string `json:"houseNumberType"` Address struct { Label string `json:"label"` CountryCode string `json:"countryCode"` CountryName string `json:"countryName"` StateCode string `json:"stateCode"` State string `json:"state"` County string `json:"county"` City string `json:"city"` District string `json:"district"` Street string `json:"street"` PostalCode string `json:"postalCode"` HouseNumber string `json:"houseNumber"` } `json:"address"` Position struct { Lat float64 `json:"lat"` Lng float64 `json:"lng"` } `json:"position"` Access []struct { Lat float64 `json:"lat"` Lng float64 `json:"lng"` } `json:"access"` Distance float64 `json:"distance"` MapView struct { West float64 `json:"west"` South float64 `json:"south"` East float64 `json:"east"` North float64 `json:"north"` } `json:"mapView"` }
type Client ¶
func (Client) Geocode ¶
func (c Client) Geocode(r GeocodeRequest) (GeoPosition, error)
func (Client) ReverseGeocodeV7 ¶
func (c Client) ReverseGeocodeV7(lat, lng float64, limit int) (*ReverseGeocodeResponse, error)
type GeoPosition ¶
type GeocodeRequest ¶
type GeocodeResponse ¶
type GeocodeResponse struct { Response struct { View []struct { Type string `json:"_type"` Result []struct { Relevance float64 `json:"Relevance"` MatchLevel string `json:"MatchLevel"` MatchQuality struct { Country float64 `json:"Country"` Street []float64 `json:"Street"` HouseNumber float64 `json:"HouseNumber"` } `json:"MatchQuality"` Location struct { LocationType string `json:"LocationType"` DisplayPosition struct { Latitude float64 `json:"Latitude"` Longitude float64 `json:"Longitude"` } `json:"DisplayPosition"` Address struct { Label string `json:"Label"` Country string `json:"Country"` State string `json:"State"` County string `json:"County"` City string `json:"City"` District string `json:"District"` Street string `json:"Street"` HouseNumber string `json:"HouseNumber"` PostalCode string `json:"PostalCode"` AdditionalData []struct { Value string `json:"value"` Key string `json:"key"` } `json:"AdditionalData"` } `json:"Address"` } `json:"Location"` } `json:"Result"` } `json:"View"` } `json:"Response"` }
func (GeocodeResponse) MostRelevantGeoPosition ¶
func (g GeocodeResponse) MostRelevantGeoPosition() (GeoPosition, error)
MostRelevantGeoPosition returns a single geo position with the highest relevant score
type ReverseGeocodeResponse ¶
type ReverseGeocodeResponse struct {
Items []Address `json:"items"`
}
Click to show internal directories.
Click to hide internal directories.