Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ForwardRequestOpts ¶
type ForwardRequestOpts struct { Country string `url:"country,omitempty"` Proximity []float64 `url:"proximity,omitempty"` Types []Type `url:"types,omitempty"` Autocomplete bool `url:"autocomplete,omitempty"` BBox base.BoundingBox `url:"bbox,omitempty"` Limit uint `url:"limit,omitempty"` }
ForwardRequestOpts request options fo forward geocoding
type ForwardResponse ¶
type ForwardResponse struct { *base.FeatureCollection Query []string }
ForwardResponse is the response from a forward geocode lookup
type Geocode ¶
type Geocode struct {
// contains filtered or unexported fields
}
Geocode api wrapper instance
func NewGeocode ¶
NewGeocode Create a new Geocode API wrapper
func (*Geocode) Forward ¶
func (g *Geocode) Forward(place string, req *ForwardRequestOpts) (*ForwardResponse, error)
Forward geocode lookup Finds locations from a place name
func (*Geocode) Reverse ¶
func (g *Geocode) Reverse(loc *base.Location, req *ReverseRequestOpts) (*ReverseResponse, error)
Reverse geocode lookup Finds place names from a location
type ReverseRequestOpts ¶
ReverseRequestOpts request options fo reverse geocoding
type ReverseResponse ¶
type ReverseResponse struct { *base.FeatureCollection Query []float64 }
ReverseResponse is the response to a reverse geocode request
type Type ¶
type Type string
Type defines geocode location response types
const ( // Country level Country Type = "country" // Region level Region Type = "region" // Postcode level Postcode Type = "postcode" // District level District Type = "district" // Place level Place Type = "place" // Locality level Locality Type = "locality" // Neighborhood level Neighborhood Type = "neighborhood" // Address level Address Type = "address" // POI (Point of Interest) level POI Type = "poi" )
Click to show internal directories.
Click to hide internal directories.