ls

package
v0.0.0-...-74f83c4 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2021 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Address

type Address struct {
	FormattedAddress string // 结构化地址信息
	Province         string // 省名
	City             string // 城市名
	District         string // 区县名
	Town             string // 乡镇名
	TownCode         string // 乡镇id
	Street           string // 街道名
	StreetNumber     string // 街道门牌号
	AdCode           int64  // 行政区划代码
	Pois             []*PoiInfo
}

type IPPosition

type IPPosition struct {
	Province string // 省名
	City     string // 城市名
}

type LBSInfo

type LBSInfo struct {
	AccessType int    //接入网络方式 移动接入网络:0 ;wifi接入网络:1 必选
	IMEI       string //手机 imei 号 必选
	CDMA       int    //非cdma:0; cdma:1 默认值为:0
	Network    string //无线网络类型 GSM/GPRS/EDGE/HSUPA/HSDPA/WCDMA (注意大写)
	BTS        string //基站信息
	IMSI       string //移动用户识别码  非必选,但建议填写
	SMAC       string //手机 mac 码 非必选,但建议填写
	ClientIP   string //移动网关IP 非必选,但建议填写
	TEL        string //手机号码  非必选
	MMAC       string //已连热点 mac 信息
}

type LBSPosition

type LBSPosition struct {
	Location         Location // poi坐标{x,y}
	Radius           int      // 定位精度半径,单位:米
	FormattedAddress string   // 结构化地址信息
	Province         string   // 省名
	City             string   // 城市名
	District         string   // 区县名
	AdCode           int64    // 行政区划代码
}

type Location

type Location struct {
	Lng float64 // 经度
	Lat float64 // 纬度
}

type Locator

type Locator interface {
	//地理编码
	Geocoder(address string, city string) (*Location, error)
	//逆地理编码
	ReverseGeocoding(lat, lng float64) (*Address, error)
	//普通IP定位
	IPLocation(ip string) (*IPPosition, error)
	//通过WI-FI、基站智能硬件定位
	LBSLocation(params *LBSInfo) (*LBSPosition, error)
	//获取实况天气
	GetWeatherNow(adcode int64) (*WeatherInfo, error)
}

type PoiInfo

type PoiInfo struct {
	UID       string   // poi唯一标识
	Addr      string   // 地址信息
	Direction string   // 和当前坐标点的方向
	Distance  int64    // 离坐标点距离
	Name      string   // poi名称
	Tag       string   // poi类型,如’美食;中餐厅’
	Location  Location // poi坐标{x,y}
	Tel       string   // 电话
}

poi信息

type WeatherInfo

type WeatherInfo struct {
	Province      string // 省
	City          string // 市
	Adcode        string // 行政区域代码
	Weather       string // 天气现象(汉字描述)
	Temperature   string // 实时气温,单位:摄氏度
	WindDirection string // 风向描述
	WindPower     string // 风力级别,单位:级
	Humidity      string // 空气湿度
	ReportTime    string
}

实况天气

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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