Search code examples
phpjsonmapquest

MapQuest API - Insight from users


I need to be able to extract a list of states the route passes through. Is there any functionality within the api that will provide this information?

e.g. A route that crosses 6 states from start point to end point. Get list of states. Preferably in order of crossing.

I'm not looking for code help. I've searched through the api and google with no results.


Solution

  • There is no function in the MapQuest directions api that returns a list of states for a route. But if the stateBoundaryDisplay parameter is set to true, the response will contain details like, "Crossing into Nebraska", in the maneuver text. The manuevers will be in the correct order.