thore.com路线API -V8-州里程
我们正在尝试从路由V7迁移到路由V8。使用V8,我们如何获得每个美国每个州的英里拆分?
在版本7.2中,我们可以做
,状态代码将在summaryBycountry element element:
"summaryByCountry": [
{
"distance": 189887,
"trafficTime": 8239,
"baseTime": 8206,
"flags": [
"motorway",
"builtUpArea"
],
"text": "The trip takes 118 mi and 2:17 h.",
"travelTime": 8206,
"country": "South Carolina",
"_type": "RouteSummaryByCountryType"
},
...
in版本8,类似的请求中,
a href =“ href =” href =“ href =” ://router.hereapi.com/v8/routes?apikey = api_key& rigin = 32.20618,-110.96474& destination = 40.391537,-104.681168 %5bcountries%5D = mex,可以& units = imperial = imperial = polyline,摘要,动作,说明及跨度= countrycode,长度,长度,truckattributes,notic& tark& trunp& trunp& trunp& trunp& track& track& track& "nofollow noreferrer">https://router.hereapi.com/v8/routes?apiKey=API_KEY&origin=32.20618,-110.96474&destination=40.391537,-104.681168&routingMode=fast&transportMode=truck&avoid[features ] =渡轮&排除[国家] = mex,可以& units = impey& return = polyline,摘要,动作,说明及跨度及countrycode = countrycode,length,truckattributes,notices& track& traberc& trailers& amp; via = 1& via = 40.014984,-105.25.2705.270546
"spans": [
{
"offset": 0,
"truckAttributes": [
"open"
],
"length": 1460740,
"countryCode": "USA"
},
{
"offset": 14050,
"truckAttributes": [
"open",
"tollRoad"
],
"length": 272,
"countryCode": "USA"
},
{
"offset": 14053,
"truckAttributes": [
"open"
],
"length": 23153,
"countryCode": "USA"
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
V7:摘要Bycountry
V8:不存在。如果要求用跨度= countryscode,长度,则可以检索有关每个国家距离的信息。没有任何其他方式支持的计划。
V8中的响应包含:
链接到迁移指南: https:htttps> https:https:https://开发人员。 ereshy.com/documentation/Routing-api/migration_guide/index.html
v7: summaryByCountry
v8: Not present. If spans are requested with spans=countryCode,length, then information about the distance in each country can be retrieved. No plans to support in any other manner.
Response in v8 contains :
link to migration guide : https://developer.here.com/documentation/routing-api/migration_guide/index.html