Documentation ¶
Index ¶
Constants ¶
View Source
const ( ZoomLevel = 15 MapsURLTemplate = "https://www.google.com/maps/@%f,%f,%dz" )
View Source
const ( // GoogleMapsSecretKey is the enviroment key for the Google Maps API token. GoogleMapsSecretKey = "GOOGLE_MAPS_SECRET" StreetType = "neighborhood" NumberType = "street_number" StateType = "administrative_area_level_1" CountryType = "country" CityType = "political" // Regexp to see if the file path appears to be of a supported image type // (currently jpg/png). ImgRegexp = "^.*\\.(jpg|jpeg|png)" )
Variables ¶
View Source
var ( ErrNoToken = fmt.Errorf( "No google maps API token (export %s=<API_TOKEN>).", GoogleMapsSecretKey, ) ErrClientNotInitialized = fmt.Errorf("Google maps client has not been initialized") )
Functions ¶
Types ¶
type Location ¶
Location desribes a location by various address elements.
func GetImageLocationData ¶
GetImageLocationData returns the Location at which an image, at a certain path was taken.
func (*Location) SetLocation ¶
func (l *Location) SetLocation(addr []maps.AddressComponent)
SetLocation finds the relevant field types in a slice of address components and converts and sets the corresponding Locatio fields.
Click to show internal directories.
Click to hide internal directories.