I'm using the Bing Maps V8 controls and I can't seem to turn off getting alternate routes.

RJBreneman 201 Reputation points
2025-08-08T19:37:35.1033333+00:00

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. 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.
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.