Better way to get LinkId's for roads?

3 posts / 0 new
Last post
Better way to get LinkId's for roads?

I am evaluating the MapQuest API for a small project which involves routing for vehicles, and avoiding certain roads.  I'm finding that I can do this, but getting the LinkId's for the roads to avoid is very cumbersome.

This is how i'm doing it:

- In Mapquest, right-click a portion of the road.

- Copy/Paste Lat/Long to ASP.Net page I have that returns the LinkId.

- Put LinkId into my database

When a road crosses an intersection, it seems to usually get a new LinkId, so a given route I need to avoid could have a dozen LinkId's or more, so repeat process above.

Is this the best way, or is there a trick method so that I can simply right-click the road and see the LinkId right there, rather than what could be days of clicking and running Lat/Longs through the API?



Reviewing the terms of

Reviewing the terms of service, it seems maybe I shouldn't be storing LinkIds and instead will need to requery them by Lat/Long each time routing is done.  Is that right?

You can use the directions/v2
You can use the directions/v2/findlinkid request to grab the id and you can save the id too. You can't save maps or route or geocode results, but link id is ok.