I have a HERE v7-based routing app that uses stored link IDs with the avoidLinks
parameter to avoid certain road segments when calculating routes. Is there a straightforward way to convert v7 link IDs to segment IDs that can be used with the avoid[segments]
parameter in the v8 API?
straightforward way doesn't exist but below is not difficult:
Get tile id/tile ids for each target link id utilize request like https://smap.hereapi.com/v8/maps/index.json?layer=ROAD_GEOM_FCn&attributes=LINK_ID&values=17340430,565725162&apikey=
Take from above response functional class (level - (minus) 8) then set it to TOPO_SEG_ID_FCx (instead of x) and tile id/tile ids then send it like: https://smap.hereapi.com/v8/maps/attributes.json?layers=TOPO_SEG_ID_FC5,TOPO_SEG_ID_FC2&in=tile:105766770,1651694&apikey=
Documentation:
https://demo.support.here.com/pde
https://developer.here.com/documentation/content-map-attributes/api-reference.html
Maybe example: https://demo.support.here.com/examples/v3.1/map_attributes_along_route