1
This commit is contained in:
@@ -720,20 +720,24 @@ func GetSToURidingDistance2(sLng, sLat, uLng, uLat float64, orderId string) (way
|
||||
// GetCyclingLine 获取骑行路线
|
||||
func GetCyclingLine(sLng, sLat, uLng, uLat float64) (polyLineList []string, distance, duration int64, err error) {
|
||||
// 百度
|
||||
/*var coords []*baidunavi.Coordinate
|
||||
coords = append(coords, &baidunavi.Coordinate{
|
||||
Lng: sLng,
|
||||
Lat: sLat,
|
||||
}, &baidunavi.Coordinate{
|
||||
Lat: uLat,
|
||||
Lng: uLng,
|
||||
})
|
||||
/* var coords []*baidunavi.Coordinate
|
||||
coords = append(coords, &baidunavi.Coordinate{
|
||||
Lng: sLng,
|
||||
Lat: sLat,
|
||||
}, &baidunavi.Coordinate{
|
||||
Lat: uLat,
|
||||
Lng: uLng,
|
||||
})*/
|
||||
|
||||
// 高德坐标转换成百度坐标
|
||||
coords, err = api.TencentMapAPI.TencentCoordinateChange(coords, baidunavi.CoordSysGaoDe2Baidu)
|
||||
/*coords, err := api.TencentMapAPI.TencentCoordinateChange(&tencent_map.TencentCoordinateChangeReq{
|
||||
Locations: fmt.Sprintf("%.6f,%.6f;%.6f,%.6f", sLat, sLng, uLat, uLng),
|
||||
Type: tencent_map.CoordinateChangeTypeBaidu,
|
||||
})
|
||||
if err != nil || len(coords) <= model.NO {
|
||||
return nil, 0, 0, err
|
||||
}*/
|
||||
}
|
||||
*/
|
||||
distance, duration, polyLineList, err = api.TencentMapAPI.TencentCyclingPlanning(&tencent_map.TencentCyclingPlanningReq{
|
||||
From: fmt.Sprintf("%.6f,%.6f", sLat, sLng),
|
||||
To: fmt.Sprintf("%.6f,%.6f", uLat, uLng),
|
||||
|
||||
Reference in New Issue
Block a user