Documentation ¶
Index ¶
Constants ¶
View Source
const ( // CountryAbroad 国外 CountryAbroad = "" /* 749-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 ¶
Types ¶
type Context ¶ added in v0.9.2
type Context struct { ID string `json:"id,omitempty"` MapboxID string `json:"mapbox_id,omitempty"` TextZh string `json:"text_zh,omitempty"` Text string `json:"text,omitempty"` Wikidata string `json:"wikidata,omitempty"` ShortCode string `json:"short_code,omitempty"` LanguageZh string `json:"language_zh,omitempty"` Language string `json:"language,omitempty"` }
type CountryStr ¶
type CountryStr string // 国家代码
type Feature ¶ added in v0.9.2
type Feature struct { ID string `json:"id,omitempty"` Type string `json:"type,omitempty"` PlaceType []string `json:"place_type,omitempty"` Relevance float64 `json:"relevance,omitempty"` Properties Properties `json:"properties,omitempty"` TextZh string `json:"text_zh,omitempty"` LanguageZh string `json:"language_zh,omitempty"` PlaceNameZh string `json:"place_name_zh,omitempty"` Text string `json:"text,omitempty"` Language string `json:"language,omitempty"` PlaceName string `json:"place_name,omitempty"` MatchingText string `json:"matching_text,omitempty"` MatchingPlaceName string `json:"matching_place_name,omitempty"` Center [2]float64 `json:"center,omitempty"` Geometry Geometry `json:"geometry,omitempty"` Context []Context `json:"context,omitempty"` }
type Geocoding ¶
type Geocoding struct { Mapbox Country CountryStr Language string Q string }
func NewGeocoding ¶
type GeocodingRes ¶ added in v0.9.2
type LanguageStr ¶
type LanguageStr string // 语言代码
Click to show internal directories.
Click to hide internal directories.