74 lines
2.4 KiB
Go
74 lines
2.4 KiB
Go
package baidunavi
|
|
|
|
// RiderPath 骑行路线
|
|
//type RiderPath struct {
|
|
// Status int `json:"status"` // 状态码 0-成功,1-服务器内部错误,2-参数无效,7-无结果返回
|
|
// Message string `json:"message"` // 状态码对应的信息
|
|
// Result struct {
|
|
// RiderResult
|
|
// Routes []struct {
|
|
// Distance int `json:"distance"` // 距离米
|
|
// Duration int `json:"duration"` // 时间秒
|
|
// Steps []struct {
|
|
// Distance int `json:"distance"`
|
|
// Duration int `json:"duration"`
|
|
// Direction int `json:"direction"`
|
|
// TurnType string `json:"turn_type"`
|
|
// Name string `json:"name"`
|
|
// Instruction string `json:"instruction"`
|
|
// RestrictionsInfo string `json:"restrictions_info"`
|
|
// Path string `json:"path"`
|
|
// StartLocation RiderCoordinate `json:"start_location"`
|
|
// EndLocation RiderCoordinate `json:"end_location"`
|
|
// } `json:"steps"`
|
|
// } `json:"routes"`
|
|
// } `json:"result"`
|
|
//}
|
|
//
|
|
//type RiderResult struct {
|
|
// Origin RiderCoordinate `json:"origin"` // 起点经纬度
|
|
// Destination RiderCoordinate `json:"destination"` // 终点经纬度
|
|
//}
|
|
//
|
|
//type RiderCoordinate struct {
|
|
// Lng float64 `json:"lng"` // 经度
|
|
// Lat float64 `json:"lat"` // 纬度
|
|
//}
|
|
|
|
type RiderPath struct {
|
|
Status int `json:"status"`
|
|
Message string `json:"message"`
|
|
Result struct {
|
|
Origin struct {
|
|
Lng float64 `json:"lng"`
|
|
Lat float64 `json:"lat"`
|
|
} `json:"origin"`
|
|
Destination struct {
|
|
Lng float64 `json:"lng"`
|
|
Lat float64 `json:"lat"`
|
|
} `json:"destination"`
|
|
Routes []struct {
|
|
Distance int `json:"distance"`
|
|
Duration int `json:"duration"`
|
|
Steps []struct {
|
|
Distance int `json:"distance"`
|
|
Duration int `json:"duration"`
|
|
Direction int `json:"direction"`
|
|
TurnType string `json:"turn_type"`
|
|
Name string `json:"name"`
|
|
Instruction string `json:"instruction"`
|
|
RestrictionsInfo string `json:"restrictions_info"`
|
|
Path string `json:"path"`
|
|
StartLocation struct {
|
|
Lng string `json:"lng"`
|
|
Lat string `json:"lat"`
|
|
} `json:"start_location"`
|
|
EndLocation struct {
|
|
Lng string `json:"lng"`
|
|
Lat string `json:"lat"`
|
|
} `json:"end_location"`
|
|
} `json:"steps"`
|
|
} `json:"routes"`
|
|
} `json:"result"`
|
|
}
|