1
This commit is contained in:
@@ -738,12 +738,13 @@ func GetCyclingLine(sLng, sLat, uLng, uLat float64) (polyLineList []string, dist
|
||||
return nil, 0, 0, err
|
||||
}
|
||||
|
||||
distance = int64(path.Routes[0].Distance) // 距离
|
||||
duration = int64(path.Routes[0].Duration) // 时间
|
||||
if path != nil && len(path.Routes) != 0 {
|
||||
distance = int64(path.Routes[0].Distance) // 距离
|
||||
duration = int64(path.Routes[0].Duration) // 时间
|
||||
|
||||
for _, v := range path.Routes[0].Steps {
|
||||
polyLineList = append(polyLineList, strings.Split(v.Path, ";")...)
|
||||
for _, v := range path.Routes[0].Steps {
|
||||
polyLineList = append(polyLineList, strings.Split(v.Path, ";")...)
|
||||
}
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user