增加地址解析
This commit is contained in:
81
gps_tool/response.go
Normal file
81
gps_tool/response.go
Normal file
@@ -0,0 +1,81 @@
|
||||
package gps_tool
|
||||
|
||||
type ApiResult struct {
|
||||
Data Data `json:"data"`
|
||||
Msg string `json:"msg"`
|
||||
Success bool `json:"success"`
|
||||
Code int `json:"code"`
|
||||
TaskNo string `json:"taskNo"`
|
||||
}
|
||||
|
||||
type Data struct {
|
||||
Regeocodes []Regeocode `json:"regeocodes"`
|
||||
}
|
||||
|
||||
type Regeocode struct {
|
||||
FormattedAddress string `json:"formatted_address"`
|
||||
AddressComponent AddressComponent `json:"addressComponent"`
|
||||
}
|
||||
|
||||
type AddressComponent struct {
|
||||
// BusinessAreas []interface{} `json:"businessAreas"`
|
||||
Country string `json:"country"`
|
||||
Province string `json:"province"`
|
||||
Citycode string `json:"citycode"`
|
||||
City string `json:"city"`
|
||||
Adcode string `json:"adcode"`
|
||||
// StreetNumber StreetNumber `json:"streetNumber"`
|
||||
// Towncode string `json:"towncode"`
|
||||
// District string `json:"district"`
|
||||
// Neighborhood Neighborhood `json:"neighborhood"`
|
||||
// Township string `json:"township"`
|
||||
// Building Building `json:"building"`
|
||||
}
|
||||
|
||||
type BusinessArea struct {
|
||||
Name string `json:"name"`
|
||||
Location string `json:"location"`
|
||||
Id string `json:"id"`
|
||||
}
|
||||
type StreetNumber struct {
|
||||
Number string `json:"number"`
|
||||
Distance string `json:"distance"`
|
||||
Street string `json:"street"`
|
||||
Location string `json:"location"`
|
||||
Direction string `json:"direction"`
|
||||
}
|
||||
|
||||
type Neighborhood struct {
|
||||
Name interface{} `json:"name"`
|
||||
Type interface{} `json:"type"`
|
||||
}
|
||||
|
||||
type Building struct {
|
||||
Name interface{} `json:"name"`
|
||||
Type interface{} `json:"type"`
|
||||
}
|
||||
|
||||
type LocationInfo struct {
|
||||
Data LocationDatum `json:"data"`
|
||||
Msg string `json:"msg"`
|
||||
Success bool `json:"success"`
|
||||
Code int `json:"code"`
|
||||
TaskNo string `json:"taskNo"`
|
||||
}
|
||||
|
||||
type LocationDatum struct {
|
||||
Count int `json:"count"`
|
||||
Geocodes []Geocode `json:"geocodes"`
|
||||
}
|
||||
|
||||
type Geocode struct {
|
||||
Country string `json:"country"`
|
||||
FormattedAddress string `json:"formatted_address"`
|
||||
City string `json:"city"`
|
||||
Adcode string `json:"adcode"`
|
||||
Level string `json:"level"`
|
||||
Province string `json:"province"`
|
||||
Citycode string `json:"citycode"`
|
||||
District string `json:"district"`
|
||||
Location string `json:"location"`
|
||||
}
|
Reference in New Issue
Block a user