1
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
package cms
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"git.rosy.net.cn/jx-callback/globals"
|
||||
"math"
|
||||
@@ -740,9 +739,13 @@ func GetCyclingLine(sLng, sLat, uLng, uLat float64) (polyLineList []string, dist
|
||||
return nil, 0, 0, fmt.Errorf("获取骑行规划路线错误")
|
||||
}
|
||||
path := &baidunavi.RiderPath{}
|
||||
if err := json.Unmarshal([]byte(data.(string)), path); err != nil {
|
||||
if err := utils.Map2StructByJson(data, path, false); err != nil {
|
||||
return nil, 0, 0, err
|
||||
}
|
||||
globals.SugarLogger.Debugf("==============:path %s", utils.Format4Output(path, false))
|
||||
//if err := json.Unmarshal([]byte(data.(map[string]interface{})), path); err != nil {
|
||||
// return nil, 0, 0, err
|
||||
//}
|
||||
if path.Status != model.NO {
|
||||
return nil, 0, 0, fmt.Errorf("%d,%s", path.Status, path.Message)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user