javaandroiddirectionsmapquestmap-directions

Blacklisting closed roads on MapQuest Directions API


I'm developing an Android application that collects information about interrupted roads, sports events, celebrations or changes in the direction of traffic and tries to provide directions avoiding the roads where do these events take place.

As I've searched Google doesn't have developed this function in any of their APIs. So MapQuest seemed the most reasonable solution, according to my research. My question is if exists any code or tutorial that could help to achieve this goal.


Solution

  • MapQuest's Directions api can do that. The mustAvoidLinkIds parameter will take a list of road segment ids (grabbed from the findlinkid request) that routes will avoid. Routes can be encouraged toward or discouraged from points using route control points too.