1
This commit is contained in:
@@ -4,7 +4,6 @@ import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
"git.rosy.net.cn/jx-callback/globals"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
@@ -72,13 +71,15 @@ func (a *API) TencentCyclingPlanning(param *TencentCyclingPlanningReq) (distance
|
||||
for i := 2; i < len(v.Polyline); i++ {
|
||||
point1 := utils.Str2Float64(pointList[i-2])
|
||||
point2, _ := v.Polyline[i].Float64()
|
||||
pointList = append(pointList, fmt.Sprintf("%.6f", point1+point2/float64(1000000)))
|
||||
|
||||
point3 := point1 + point2/float64(1000000)
|
||||
point4 := fmt.Sprintf("%.13f", point3)
|
||||
pointList = append(pointList, point4)
|
||||
}
|
||||
|
||||
for i := 0; i < len(pointList); i += 2 {
|
||||
coordinatePoint = append(coordinatePoint, fmt.Sprintf("%s,%s", pointList[i+1], pointList[i]))
|
||||
}
|
||||
globals.SugarLogger.Debugf("调换后 : %s", utils.Format4Output(coordinatePoint, false))
|
||||
|
||||
return distance, duration, coordinatePoint, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user