Getting time and distance for each leg

7 posts / 0 new
Last post
atomtm
Getting time and distance for each leg

Hello everyone , new to mapquest!

Using https://developer.mapquest.com/documentation/mapquest-js/v1.3/examples/directions-with-optimized-waypoints/ , is there a way I can display the duration and distance for each leg ?

Thank you in advance!

 


MQBrianCoakley
Yup. Each leg has its own
Yup. Each leg has its own distance and time as well as the overall route and each maneuver.

atomtm
Thank you for your reply !

Thank you for your reply !

How can I add this info to the map ? is there an easy way to do this?

 


atomtm
labels for each leg

What I want is labels on each leg , with distance time like in this example ( for alternate routes) https://developer.mapquest.com/documentation/mapquest-js/v1.3/examples/d... , but without the directionsControl.

Thank you


MQBrianCoakley
There is no simple method to
There is no simple method to customize the narrative control as you've described. The control is documented in more detail here, but it's pretty basic customizability there.

atomtm
route leg labels

Just wanted to clarify since you mentioned narrative control . I need label per route leg like this : https://i.imgur.com/JHaVRl2.png .

Thanks again! I really appeciate your effort


MQBrianCoakley
While the MapQuest.com web
While the MapQuest.com web site is built using MapQuest.js, it is a customized integration. You can fill out the Contact Us form in the upper right to discuss having the MapQuest professional services team build MapQuest.com type functionality.