This commit is contained in:
邹宗楠
2024-07-04 16:23:30 +08:00
parent d1c406fcdf
commit 7715edcd1e

View File

@@ -2,6 +2,7 @@ package cms
import (
"fmt"
"git.rosy.net.cn/jx-callback/globals"
"math"
"reflect"
"regexp"
@@ -726,6 +727,8 @@ func GetCyclingLine(sLng, sLat, uLng, uLat float64) (polyLineList []string, dist
// 高德坐标转换成百度坐标
coords, err = api.BaiDuNaviAPI.BatchCoordinateConvert(coords, baidunavi.CoordSysGaoDe2Baidu)
globals.SugarLogger.Debugf("========coords := %s", utils.Format4Output(coords, false))
globals.SugarLogger.Debugf("========coords :err= %v", err)
if err != nil || len(coords) <= model.NO {
return nil, 0, 0, err
}
@@ -751,7 +754,10 @@ func GetCyclingLine(sLng, sLat, uLng, uLat float64) (polyLineList []string, dist
}
}
globals.SugarLogger.Debugf("========polyLine := %s", utils.Format4Output(polyLine, false))
polyLineList, err = baiDuCoord2Gaode(polyLine)
globals.SugarLogger.Debugf("========polyLineList := %s", utils.Format4Output(coords, false))
globals.SugarLogger.Debugf("========polyLineList :err= %v", err)
return
}