Hi,
Im working with Directions widget on arcgis api js 3.38...... Actually I can get all the directions details such as (features, stops, sommury, strrings,... and other details) as below
directionsW.on("directions-finish", changeHandler);
function changeHandler(data) {
console.log("done", data.result);
}
but the question is how can I get the travelModeName paramter as I need to recuperate it from the directions details result ?
https://developers.arcgis.com/javascript/3/jsapi/directions-amd.html#travelmodename
any idea please ?
Solved! Go to Solution.
Another great question. It's there in the Route Parameters, just took some digging to find. Try this:
directionsW.on("directions-finish", changeHandler);
function changeHandler(data) {
console.log("travelMode: ", data.target.routeParams.travelMode.name);
}
Another great question. It's there in the Route Parameters, just took some digging to find. Try this:
directionsW.on("directions-finish", changeHandler);
function changeHandler(data) {
console.log("travelMode: ", data.target.routeParams.travelMode.name);
}
Many thanks for your great help !