none
Migration v7 to v8: Options for DirectionsManager take no effect RRS feed

  • Question

  • I have to migrate my application to new version v8.

    When I use the setRenderOptions function some of the options take no effect, specially "visible".

    My example code:

            directionsManager.setRenderOptions({ itineraryContainer:document.getElementById('itineraryDiv'), drivingPolylineOptions: { strokeThickness: 3, strokeColor: new Microsoft.Maps.Color(1, 0, 255, 0), cursor: 'pointer' }, firstWaypointPushpinOptions: { visible: 'false' }, lastWaypointPushpinOptions: { visible: 'false' }, waypointPushpinOptions: { visible: 'false' } });
            directionsManager.calculateDirections();

    I want to have the generated waypoint pushpins to be invisible.

    In the former version v7 there was an option "pushpin" for the Waypoint. So it was possible to do something like:

                directionsManager.addWaypoint(new Microsoft.Maps.Directions.Waypoint({
                    location: myLocation,
                    pushpin: new Microsoft.Maps.Pushpin(null, {visible:false})
                }));

    This option does not exist in the new version.

    Is there any possibility to make the pushpins invisible?

    Thanks for an answer, Guido

    Wednesday, June 28, 2017 9:06 AM

Answers

  • There is no pushpin property for Waypoints in V8. Instead you have to use the render options (i.e. waypointPushpinOptions). Visibility is currently only functional in the experimental branch and will be enabled in the main release branch in the next update planned in a couple of weeks. You can try this in your app by adding &branch=experimental to the map script URL.


    [Blog] [twitter] [LinkedIn]

    Monday, July 24, 2017 11:18 PM