Ai
3 Star 0 Fork 1

鞪林/go-map

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
model.go 4.11 KB
一键复制 编辑 原始数据 按行查看 历史
richard 提交于 2021-06-29 11:09 +08:00 . add adcode field in LBS location
package amap
type GeocoderRes struct {
Status string `json:"status"` // 返回结果状态值, 成功返回0,其他值请查看下方返回码状态表。
Msg string `json:"info"` // 错误消息
Geocodes []*Geocode `json:"geocodes"` // data数据
}
type Geocode struct {
FormattedAddress string `json:"formatted_address"` // 结构化地址信息
Province interface{} `json:"province"` // 省名
City interface{} `json:"city"` // 城市名
District interface{} `json:"district"` // 区县名
Street interface{} `json:"street"` // 街道名
StreetNumber interface{} `json:"number"` // 街道门牌号
AdCode string `json:"adcode"` // 行政区划代码
Location string `json:"location"` // 坐标点
}
type ReverseGeocodingRes struct {
Status string `json:"status"` // 返回结果状态值, 成功返回0,其他值请查看下方返回码状态表。 int
Msg string `json:"info"` // 错误消息
Regeocodes regeocode `json:"regeocode"` //逆地理编码列表
}
type regeocode struct {
FormattedAddress string `json:"formatted_address"` // 结构化地址信息
AddressComponent addressComponent `json:"addressComponent"` // 地址元素列表
Pois []*poi `json:"pois"` // poi信息列表
}
type addressComponent struct {
Province string `json:"province"` // 省名
City interface{} `json:"city"` // 城市名
District interface{} `json:"district"` // 区县名
Town interface{} `json:"township"` // 乡镇名
TownCode interface{} `json:"towncode"` // 乡镇id
AdCode string `json:"adcode"` // 行政区划代码
StreetInfo struct {
Street interface{} `json:"street"` // 乡镇id
StreetNumber interface{} `json:"number"` // 乡镇id
} `json:"streetNumber"`
}
type poi struct {
UID string `json:"id"` // poi唯一标识
Addr string `json:"address"` // 地址信息
Direction string `json:"direction"` // 和当前坐标点的方向
Distance int64 `json:"distance"` // 离坐标点距离
Name string `json:"name"` // poi名称
Tag string `json:"type"` // poi类型,如’美食;中餐厅’
Location string `json:"location"` // poi坐标{x,y}
Tel string `json:"tel"` // 电话
}
type IPLocationRes struct {
Status string `json:"status"` // 返回结果状态值, 成功返回0,其他值请查看下方返回码状态表。 int
Msg string `json:"info"` // 错误消息
Province string `json:"province"` // 省名
City string `json:"city"` // 城市名
}
type LBSLocationRes struct {
Status string `json:"status"` // 返回结果状态值, 成功返回0,其他值请查看下方返回码状态表。 int
Msg string `json:"info"` // 错误消息
Result result `json:"result"`
}
type result struct {
Type string `json:"type"` // 定位类型,0:没有得到定位结果;其他数字为:正常获取定位结果
Location string `json:"location"` // poi坐标{x,y}
Radius string `json:"radius"` // 定位精度半径,单位:米
FormattedAddress string `json:"desc"` // 结构化地址信息
AdCode string `json:"adcode"` // 行政区划代码
}
type WeatherResponse struct {
Status string `json:"status"` // 返回状态 值为0或1 1:成功;0:失败
Count string `json:"count"` // 返回结果总数目
Info string `json:"info"` // 返回的状态信息
InfoCode string `json:"infocode"` // 返回状态说明,10000代表正确
Lives []Live `json:"lives"` // 实况天气数据信息
}
type Live struct {
Province string `json:"province"`
City string `json:"city"`
Adcode string `json:"adcode"`
Weather string `json:"weather"`
Temperature string `json:"temperature"`
WindDirection string `json:"winddirection"`
WindPower string `json:"windpower"`
Humidity string `json:"humidity"`
ReportTime string `json:"reporttime"`
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/xslasd/go-map.git
git@gitee.com:xslasd/go-map.git
xslasd
go-map
go-map
74f83c4691ac

搜索帮助