I'm using the Bing Maps V8 controls and I can't seem to turn off getting alternate routes.
RJBreneman
201
Reputation points
I'm using the Bing Maps V8 controls and would like to turn off alternate routes being shown. The maxRoutes option doesn't seem to work. What am I missing? The module is loaded with:
Microsoft.Maps.loadModule('Microsoft.Maps.Directions', { callback: directionsModuleLoaded });
And directionsModuleLoaded is:
function directionsModuleLoaded() {
directionsManager = new Microsoft.Maps.Directions.DirectionsManager(map);
directionsManager.setRenderOptions({
itineraryContainer: document.getElementById('itineraryDiv'), waypointPushpinOptions: { draggable: false }
, displayManeuverIcons: false, displayPostItineraryItemHints: false, displayPreItineraryItemHints: false
, displayStepWarnings: false
});
directionsManager.setRequestOptions({ routeDraggable: false, maxRoutes: 1, routeIndex: 0 });
}
Screenshot showing alternate routes.
Azure Maps
Azure Maps
An Azure service that provides geospatial APIs to add maps, spatial analytics, and mobility solutions to apps.
Sign in to answer