MapCityData

package
v5.2.20 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCodeByCityName

func GetCodeByCityName(cityName string) (provinceCode string, cityCode string)

GetCodeByCityName 通过城市检索行政编码

func GetNameByCityCode

func GetNameByCityCode(code string) string

GetNameByCityCode 通过城市编码获取名称

func GetOnlyCityData

func GetOnlyCityData() []dataAreaData

func Init

func Init() (err error)

Init 初始化

func SearchPCR

func SearchPCR(province, city, region string) (provinceCode string, cityCode string, regionCode string)

SearchPCR 根据三要素查询符合条件的数据集

Types

type DataProvinceData

type DataProvinceData struct {
	Code     string         `json:"code"`
	Name     string         `json:"name"`
	CityList []dataCityData `json:"cityList"`
}

func GetCityData

func GetCityData() []DataProvinceData

GetCityData 获取全局城市数据包

Jump to

Keyboard shortcuts

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