none
How to hide the Directions coming on left panel when i made a call to calculateDirections(). RRS feed

  • Question

  • I want to hide the driving directions and only want to render the route in Bing Map. Which DirectionsRequestOptions or other option do i need to set. I believe(not sure) that those HTMl are associated with PushpinOptions options. I made the visible option false there to made it go away.

    Here is my code :

                directionsManager = new Microsoft.Maps.Directions.DirectionsManager(map);

                for (var i = 0; i < array.length; i++) {
                    directionsManager.addWaypoint(new Microsoft.Maps.Directions.Waypoint({ location: new Microsoft.Maps.Location(array[i].Latitude, array[i].Longitude) }));
                }

                directionsManager.setRequestOptions({ routeMode: Microsoft.Maps.Directions.RouteMode.driving });

                directionsManager.setRenderOptions({ itineraryContainer: document.getElementById('tripMapDiv'), autoDisplayDisambiguation: false, displayManeuverIcons: false, displayPostItineraryItemHints: false, displayRouteSelector: false, displayPreItineraryItemHints: false, displayStepWarnings: false, displayTrafficAvoidanceOption: false, displayWalkingWarning: false, waypointPushpinOptions: { visible: false }, drivingPolylineOptions: { strokeColor: new Microsoft.Maps.Color(200, 0, 255, 0) } });

                directionsManager.calculateDirections();

    I was trying various renderoptions by making it to false but nothing helps. Although i made the pins visible false.

    Regards


    • Edited by rkagrawal Thursday, September 26, 2013 7:24 AM
    Thursday, September 26, 2013 6:27 AM

Answers

  • Try not setting the itineraryContainer option in the render options.

    http://rbrundritt.wordpress.com

    • Proposed as answer by Ricky_Brundritt Thursday, September 26, 2013 8:42 AM
    • Marked as answer by rkagrawal Thursday, September 26, 2013 9:06 AM
    Thursday, September 26, 2013 8:42 AM

All replies