Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var NominatimServer = "https://nominatim.openstreetmap.org"
View Source
var StreetListDirectory = "streetlists"
Functions ¶
func VerifyAnswer ¶
func VerifyAnswer(guess types.Coordinate, answer string) (bool, error)
Types ¶
type BoundingBox ¶
type MapOptions ¶
type MapOptions struct { BoundingBox *BoundingBox `json:"boundingBox"` Center types.Coordinate `json:"center"` MinZoom int `json:"minZoom"` MaxZoom int `json:"maxZoom"` }
type Street ¶
type Street struct { Name string Coordinate *types.Coordinate `json:"coord"` }
type StreetList ¶
type StreetList struct { FileName string Country string `json:"country"` City string `json:"city"` Name string `json:"name"` MapOptions MapOptions `json:"map"` Streets []string `json:"streets"` // contains filtered or unexported fields }
func ReadStreetList ¶
func ReadStreetList(fileName string) (*StreetList, error)
func (*StreetList) GetRandomStreet ¶
func (s *StreetList) GetRandomStreet(random *rand.Rand) (Street, error)
type StreetListHeader ¶
type StreetListHeader struct { FileName string Name string `json:"name"` MapOptions MapOptions `json:"map"` }
func ReadStreetLists ¶
func ReadStreetLists() ([]StreetListHeader, error)
Click to show internal directories.
Click to hide internal directories.