简体   繁体   English

获取路线链接的形状

[英]Get shape of route link

Is there a possibility to get a shape, either polyline or coordinates, of route link by it's id using HERE API? 是否可以使用HERE API通过ID获得路线链接的形状(折线或坐标)? I am calculating a road using calculate route endpoint by passing few avoid link's which I would like to show on the map. 我正在通过传递一些我想在地图上显示的避免链接来计算路线终点来计算道路。 How can I achieve that? 我该如何实现? I was able to get tileX and tileY for each link using https://pde.cit.api.here.com/1/index.json but when I convert it to coordinates(per documentation) it gives me inaccurate results. 我能够使用https://pde.cit.api.here.com/1/index.json为每个链接获取tileX和tileY,但是当我将其转换为坐标时(根据文档),这给我带来了不准确的结果。

if you are using REST API, you can get shape with a request like this: 如果您使用的是REST API,则可以通过以下请求获得形状:

http://route.api.here.com/routing/7.2/calculateroute.json?
app_id=XXXX
&app_code=YYYYY
&mode=fastest;car
&routeattributes=shape
&waypoint0=48.98381310475713,2.5028838962316513
&waypoint1=48.83000339882299,2.2315230274810745

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM