none
Route Avoidance Reset RRS feed

  • Question

  • I currently have a control panel for my map that has a checkbox labeled, "Avoid toll roads". When a route with at least two way points has been displayed and the user checks to avoid toll roads, the map will be updated with a new route that avoids toll roads. However, when the user clicks the same checkbox to uncheck to avoid toll roads, the map will be updated but still show the same route to avoid the toll roads.

    I would like for the map to be updated to show the quickest route not adhering to any route avoidance preferences. I have tried the methods below and have not been successful.

    directionsManager.setRequestOptions({routeAvoidance: []});
    
    directionsManager.setRequestOptions({routeAvoidance: [Microsoft.Maps.Directions.RouteAvoidance.none]});
    
    directionsManager.setRequestOptions({routeOptimization:[Microsoft.Maps.Directions.RouteOptimization.shortestTime]});
    Is there a way to reset the route avoidance?
    Thursday, February 28, 2019 9:06 PM

All replies