这里API:避免过境

时间:2018-05-18 08:01:33

标签: here-api

有没有办法不通过国家过境?我的意思是我想从一个欧盟国家旅行到另一个国家,但是这里的api路线不是欧盟成员国,这是一条糟糕的路线。例如,从维尔纽斯(立陶宛)到格但斯克(波兰)路线经加里宁格勒(俄罗斯)或从维尔纽斯(立陶宛)到比亚韦斯托克(波兰)经白俄罗斯。

1 个答案:

答案 0 :(得分:0)

您可以通过在路由API中明确说明来避开某个国家或地区来实现此目的。

  1. avoidareas参数-您可以提供一组地理坐标或链接以避免在计算路线时使用。

    https://route.api.here.com/routing/7.2/calculateroute.json?app_code= {YOUR-APP-CODE}&app_id = {YOUR-APP-ID}&avoidareas = 54.855357,19.989972; 54.294932,22.802473&cost_optimize = 0&detail = 1&tollvehicletype = 3&vehicleweight = 40.0t&height = 4.0&jsonattribuage = 41&language -us&limitedweight = 40.0&manualverattributes = po,ti,pt,ac,di,fj,ix&metricsystem = metric&mode = fastest; truck; dirtRoad:-2&routeattributes = sh,gr&waypoint0 = geo!54.898521,23.903597&waypoint1 = geo!54.352025,18.6461.5&perax

  2. excludecountries参数-您可以提供在计算路线时要避免的国家/地区列表

    https://route.api.here.com/routing/7.2/calculateroute.json?app_code= {YOUR-APP-CODE}&app_id = {YOUR-APP-ID}&excludecountries = RUS&cost_optimize = 0&detail = 1&tollvehicletype = 3&vehicleweight = 40.0t&height = 4.0&jsonattributes = 41&language = zh-CN&limitedweight = 40.0&maneuverat ,ti,pt,ac,di,fj,ix&metricsystem = metric&mode = fastest; truck; dirtRoad:-2&routeattributes = sh,gr&waypoint0 = geo!54.898521,23.903597&waypoint1 = geo!54.352025,18.646638&weightperaxle = 11.5

  3. >

在我们的开发人员网站上了解有关这些内容的更多信息。祝您编码愉快!