简体   繁体   中英

Here Map API road segment LinkId connections

I am trying to estimate the position of a vehicle given its previous position, speed and heading. When I reach the end of one road segment I want to identify the next segment that is connected. Is there an API call that given the LinkId it returns the connected link segments?

I am currently using getlinkinfo.json but there is no connections to other road segments.

$.ajax({url: 'https://route.cit.api.here.com/routing/7.2/getlinkinfo.json'});

You could try the technique given by citizen5 here :

What I did was to request "shape points" along with the linkID of a road segment (based on your gps position). You can then use the last shape point lat lon of an associated linkID to query for the speed limit at that end point. Then based on the received LinkiDs and corresponding shape point you receive at that end point, you jump forward to the next linkIDs shape point, query for the speed limit at that lat lon, and so on.

By the way, putting &linkattributes=all at the end of your URL will get all available attributes, including Length which may be of use to you.

Unfortunately, though, on that same page seaBass states:

getlinkinfo will depreciated March 31, 2017. In order to get speed limit information you will have to use PDE (Platform Data Extension) which requires an APP ID and Code

So you may want to consider stopping development with their router API and migrate to the PDE instead.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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