location

package
v0.67.1 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2025 License: MIT Imports: 3 Imported by: 2

Documentation

Index

Constants

View Source
const (
	SubdivisionTypeCanton     = "Canton"
	SubdivisionTypeACT        = "Australian Capital Territory (ACT)"
	SubdivisionTypeCapital    = "Capital"
	SubdivisonTypeCountry     = "Country"
	SubdivisionTypeCounty     = "County"
	SubdivisionTypePrefecture = "Prefecture"
	SubdivisionTypeProvince   = "Province"
	SubdivisionTypeSAR        = "Special Administrative Region"
	SubdivisionTypeSCR        = "Special Capital Region"
	SubdivisionTypeState      = "State"
)

Variables

This section is empty.

Functions

func LatLngString added in v0.66.1

func LatLngString(loc *latlng.LatLng, sep string, precision int) string

LatLngString returns a string.

Types

type LatLong added in v0.66.1

type LatLong struct {
	Latitude  float64
	Longitude float64
}

type Location

type Location struct {
	CityName                     string
	UNLOCODE                     string
	ISO3166P1A2CountryCode       string
	ISO3166P2SubdivisionCodeFull string
	ISO3166P2CountryCode         string
	ISO3166P2SubdivisionCode     string
	ISO3166P2SubdivisionName     string
	ISO3166P2SubdivisionCategory string
	RegionType                   string
	RegionCode                   string
	RegionName                   string
	ReferenceURLs                []string
	Subregions                   []string
	SubregionsCount              int
}

type Locations

type Locations []Location

func (Locations) ContainsRegionCode

func (locs Locations) ContainsRegionCode(rc string) bool

func (Locations) SubregionsCountByCountry

func (locs Locations) SubregionsCountByCountry(countries []string) int

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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