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!
Azure Maps
Azure Maps
An Azure service that provides geospatial APIs to add maps, spatial analytics, and mobility solutions to apps.
836 questions
Windows for home | Windows 11 | Apps
349 questions
Accepted answer
-
rbrundritt 20,921 Reputation points Microsoft Employee Moderator
2021-02-02T17:56:30.733+00:00