none
Disable Route Changing and hide waypoints RRS feed

  • Question

  • Good day,

    I am working with Bing Maps (purely html and javascript) for tracking a bus moving along a predefined route. I have created the routes using the DirectionsManager, however the user has the ability to drag the route to change it. 

    I would like to disable this function such that the user is not able to change the route as well as hide all the waypoints on the route. 

    Any assistance, guidance or resources to do this would be greatly appreciated. Thanks in advance.

    Regards,

    Saturday, September 29, 2012 1:40 AM

Answers

  • For the benefit of those who may stumble upon my question:

    Disable route dragging: set the directionsManager request option routeDraggable to false

    directionsManager.setRequestOptions({
                        routeMode
    : Microsoft.Maps.Directions.RouteMode.driving,
                        routeDraggable
    : false
    Hide waypoints and viapoints: Set directionsManager Render Options waypointPushpinOptions and viapointPushpinOptions visibility to false

    directionsManager.setRenderOptions({
                    itineraryContainer
    : document.getElementById('directionsItinerary'),
                    waypointPushpinOptions
    :{visible:false},
                    viapointPushpinOptions
    :{visible:false},
               
    });

    • Edited by dave077 Sunday, September 30, 2012 3:31 AM
    • Marked as answer by dave077 Sunday, September 30, 2012 3:31 AM
    Sunday, September 30, 2012 3:30 AM