Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Nominatim ¶
type Nominatim struct { BaseURL string // Use another than default nominatim base url FormatHouseNumber bool // Remove all letters from house number UseCache bool // Use caching for same requests Sync bool // Only 1 request at the same time }
func (*Nominatim) Search ¶
func (n *Nominatim) Search(p SearchParameters) ([]SearchResult, error)
type SearchAddress ¶
type SearchAddress struct { HouseNumber string `json:"house_number"` Road string `json:"road"` Building string `json:"building"` City string `json:"city"` Suburb string `json:"suburb"` Neighbourhood string `json:"neighbourhood"` County string `json:"county"` State string `json:"state"` PostalCode string `json:"postcode"` Country string `json:"country"` CountryCode string `json:"country_code"` }
type SearchParameters ¶
type SearchParameters struct { // Search query Query string // Detailed search, don't combine with Query Street string City string County string State string Country string PostalCode string // Limit results CountryCodes []string Limit int Viewbox []float64 // x1,y1,x2,y2 // Additional features IncludeAddress bool IncludeGeoJSON bool }
type SearchResult ¶
type SearchResult struct { PlaceID int `json:"place_id"` License string `json:"licence"` OSMType string `json:"osm_type"` OSMID int `json:"osm_id"` BoundingBoxStr []string `json:"boundingbox"` LatStr string `json:"lat"` LngStr string `json:"lon"` DisplayName string `json:"display_name"` Class string `json:"class"` Type string `json:"type"` Importance float64 `json:"importance"` Icon string `json:"icon"` GeoJSON map[string]interface{} `json:"geojson"` Address SearchAddress `json:"address"` BoundingBox []float64 Lat float64 Lng float64 }
Click to show internal directories.
Click to hide internal directories.