Add maxRoutes: 1
to your options, by default this is set to 3.
How to ONLY Display Shortest Time or Shortest Distance Route in Bing Maps?
Yongxin
21
Reputation points
Hi there,
I'm trying to display the shortest time or shortest distance route on my map and only the unique route, no other options at all. I've tried the following code, it shows me always 2 or 3 options. confused!
directionsManager.setRequestOptions({
routeMode: Microsoft.Maps.Directions.RouteMode.driving,
routeOptimization: Microsoft.Maps.Directions.RouteOptimization.shortestTime
});
any idea?
best thanks!
Accepted answer
-
rbrundritt 18,686 Reputation points Microsoft Employee
2021-02-02T17:56:30.733+00:00