Multiple Stops in Route

3 posts / 0 new
Last post
Skyliaflight
Multiple Stops in Route

How do you include more than two locations in the requested route? What are the parameters for adding extra locations, besides the start and end?


MQBrianCoakley
Add more to parameters or add
Add more to parameters or add more locations to the json/xml. The kvp request can have multiple to parameters and the locations nodes in json/xml can have more than two locations.

Msingh
Adding Multiple Stops in Route

Sample post request params

{
    url: 'http://www.mapquestapi.com/directions/v2/route?key=<KEY>,
     json: {
            locations: ["city1, state1", "city2, state2", "city3, state3", "city4, state4", "city5, state5"]
             }
}

 

From https://developer.mapquest.com/products/directions

Route matrix request can handle up to 100 locations.