This commit is contained in:
邹宗楠
2023-09-08 11:28:05 +08:00
parent e75f8d737e
commit 5c3f250abe
6 changed files with 45 additions and 9 deletions

View File

@@ -40,7 +40,7 @@ func (a *API) GetCyclingPlan(origin, destination string) ([]string, int64, int64
}
}
distance = utils.Str2Int64(v.Distance)
duration = utils.Str2Int64(v.Duration) + 600
duration = utils.Str2Int64(v.Duration) + 300
}
return polyLineList, distance, duration, nil

View File

@@ -2,11 +2,11 @@ package autonavi
// 高德骑行计划账号配置
const (
AMAPCyclingPlanKey1 = "e44ae2850c0ac930b65c9652d2db0321" // 高德地图 成都若溪科技有限公司 18048531223 Rosy201507
AMAPCyclingPlanKey2 = "e44ae2850c0ac930b65c9652d2db0321" // 高德地图 成都京西到家网络科技有限公司 18080188338 Rosy201507
AMAPCyclingPlanKey3 = "e44ae2850c0ac930b65c9652d2db0321" // 高德地图 冲天猴儿(成都)科技有限公司 19802843833 Rosy201507
AMAPCyclingPlanKey4 = "e44ae2850c0ac930b65c9652d2db0321" // 高德地图 京西(成都)科技有限公司 18884789801 Rosy201507
AMAPCyclingPlanKey5 = "e44ae2850c0ac930b65c9652d2db0321" // 高德地图 京西菜市(北京)科技有限公司 17723303721 Rosy201507
AMAPCyclingPlanKey1 = "cb4ea3516f88c0fd8fed73f92aeddffa" // 高德地图 成都京西到家网络科技有限公司 18080188338 Rosy201507
AMAPCyclingPlanKey2 = "e44ae2850c0ac930b65c9652d2db0321" // 高德地图 成都若溪科技有限公司 18048531223 Rosy201507
AMAPCyclingPlanKey3 = "9805128688b11d011219e76e960e0feb" // 高德地图 冲天猴儿(成都)科技有限公司 19802843833 Rosy201507
AMAPCyclingPlanKey4 = "727130840c0466c5a79494eca9b7cf98" // 高德地图 京西(成都)科技有限公司 18884789801 Rosy201507
AMAPCyclingPlanKey5 = "962667fb03713cf9bcfce849b4c2ece1" // 高德地图 京西菜市(北京)科技有限公司 17723303721 Rosy201507
)
// 错误码

View File

@@ -6,7 +6,7 @@ import (
)
func TestGetCyclingPlan(t *testing.T) {
key := "e44ae2850c0ac930b65c9652d2db0321"
key := "cb4ea3516f88c0fd8fed73f92aeddffa"
a := New(key)
data1, dada2, dada3, err := a.GetCyclingPlan("104.045460,30.693001", "104.045474,30.693344")
fmt.Println(data1)