mapbox

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// CountryAbroad 国外
	CountryAbroad = "" /* 752-byte string literal not displayed */

	// CountryChina 国内
	CountryChina = "cn"

	// CountryGlobal 全球
	CountryGlobal = CountryAbroad + "," + CountryChina

	// LanguageChinese 中文
	LanguageChinese = "zh"
)

Variables

This section is empty.

Functions

func WithCountry

func WithCountry(country CountryStr) func(*Geocoding)

func WithLanguage

func WithLanguage(language string) func(*Geocoding)

func WithQuery

func WithQuery(q string) func(*Geocoding)

Types

type CountryStr

type CountryStr string // 国家代码

type Geocoding

type Geocoding struct {
	Mapbox

	Country  CountryStr
	Language string

	Q string
}

func NewGeocoding

func NewGeocoding(accessToken string, options ...func(*Geocoding)) *Geocoding

func (*Geocoding) Query

func (g *Geocoding) Query() ([]byte, error)

type LanguageStr

type LanguageStr string // 语言代码

type Mapbox

type Mapbox struct {
	AccessToken string
}

Jump to

Keyboard shortcuts

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