maps

package
v0.0.0-...-c8acfb9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 25, 2024 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Overview

Package maps provides a location lookup abstraction including a normalized list of countries.

Copyright (c) 2018 - 2024 PhotoPrism UG. All rights reserved.

This program is free software: you can redistribute it and/or modify
it under Version 3 of the GNU Affero General Public License (the "AGPL"):
<https://docs.photoprism.app/license/agpl>

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Affero General Public License for more details.

The AGPL is supplemented by our Trademark and Brand Guidelines,
which describe how our Brand Assets may be used:
<https://www.photoprism.app/trademark>

Feel free to send an email to hello@photoprism.app if you have questions, want to support our work, or just want to say hello.

Additional information can be found in our Developer Guide: <https://docs.photoprism.app/developer-guide/>

Index

Constants

This section is empty.

Variables

View Source
var CountryNames = map[string]string{}/* 250 elements not displayed */

Functions

func CountryName

func CountryName(code string) string

CountryName tries to find a matching country name for a code.

Types

type Location

type Location struct {
	ID string

	LocName     string
	LocStreet   string
	LocPostcode string
	LocCategory string
	LocLabel    string
	LocDistrict string
	LocCity     string
	LocState    string
	LocCountry  string
	LocKeywords []string
	LocSource   string
	// contains filtered or unexported fields
}

Location represents a geolocation.

func (Location) Category

func (l Location) Category() string

func (Location) City

func (l Location) City() string

func (Location) CountryCode

func (l Location) CountryCode() string

func (Location) CountryName

func (l Location) CountryName() string

func (Location) District

func (l Location) District() string

func (Location) KeywordString

func (l Location) KeywordString() string

func (Location) Keywords

func (l Location) Keywords() []string

func (Location) Label

func (l Location) Label() string

func (Location) Name

func (l Location) Name() string

func (Location) PlaceID

func (l Location) PlaceID() string

func (Location) Postcode

func (l Location) Postcode() string

func (Location) PrefixedToken

func (l Location) PrefixedToken() string

func (*Location) QueryApi

func (l *Location) QueryApi(api string) error

func (*Location) QueryPlaces

func (l *Location) QueryPlaces() error

func (Location) S2Token

func (l Location) S2Token() string

func (Location) Source

func (l Location) Source() string

func (Location) State

func (l Location) State() string

func (Location) Street

func (l Location) Street() string

func (*Location) Unknown

func (l *Location) Unknown() bool

type LocationSource

type LocationSource interface {
	CellID() string
	PlaceID() string
	Name() string
	Street() string
	Category() string
	Postcode() string
	District() string
	City() string
	State() string
	CountryCode() string
	Keywords() []string
	Source() string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL