1
This commit is contained in:
@@ -734,10 +734,14 @@ func GetCyclingLine(sLng, sLat, uLng, uLat float64) (polyLineList []string, dist
|
||||
})
|
||||
|
||||
coords, err = api.BaiDuNaviAPI.BatchCoordinateConvert(coords, baidunavi.CoordSysGCJ02, baidunavi.CoordSysBaiDu)
|
||||
globals.SugarLogger.Debugf("=========coords := %s", utils.Format4Output(coords, false))
|
||||
globals.SugarLogger.Debugf("=========err := %v", err)
|
||||
if err != nil || len(coords) <= model.NO {
|
||||
return nil, 0, 0, err
|
||||
}
|
||||
data, err := api.BaiDuNaviAPI.DirectionLiteRide(coords)
|
||||
globals.SugarLogger.Debugf("=========data := %s", utils.Format4Output(data, false))
|
||||
globals.SugarLogger.Debugf("=========err := %v", err)
|
||||
if err != nil {
|
||||
return nil, 0, 0, err
|
||||
}
|
||||
@@ -758,26 +762,5 @@ func GetCyclingLine(sLng, sLat, uLng, uLat float64) (polyLineList []string, dist
|
||||
polyLineList = append(polyLineList, strings.Split(v.Path, ";")...)
|
||||
}
|
||||
|
||||
// 高德()免费次数太少暂时不用
|
||||
//for {
|
||||
// polyLineList, distance, duration, errCode = api.AutonaviAPI.GetCyclingPlan(origin, destination)
|
||||
// if errCode != nil {
|
||||
// ddmsg.SendUserMessage(dingdingapi.MsgTyeText, "2452A93EEB9111EC9B06525400E86DC0", "获取骑行路线:", utils.Format4Output(errCode, false))
|
||||
// }
|
||||
// if errCode != nil && (errCode.Error() == autonavi.DAILYQUERYOVERLIMIT || errCode.Error() == autonavi.USERDAILYQUERYOVERLIMIT) {
|
||||
// AutonaviKeyIndex += model.YES
|
||||
// if AutonaviKeyIndex >= len(AutonaviKeyList) {
|
||||
// AutonaviKeyIndex = model.NO
|
||||
// }
|
||||
// api.AutonaviAPI.SetKey(AutonaviKeyList[AutonaviKeyIndex])
|
||||
// } else if errCode != nil {
|
||||
// return nil, 0, 0, errCode
|
||||
// }
|
||||
//
|
||||
// if len(polyLineList) > model.NO {
|
||||
// return polyLineList, distance, duration, errCode
|
||||
// }
|
||||
//}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user