none
Bing Maps V8 directions manager input panel only updates part of the map/route RRS feed

  • Question

  • Hi,

    Not sure what I'm doing wrong, but if I add multiple waypoints to the Bing Maps v8 directions manager and display the input panel, moving and/or deleting waypoints in the input panel does not update everything correctly.  The waypoint indicators (the A, B, C, etc.) are not updated in the itenerary, but they are on the map.  They waypoint labels are not updated on the map, but the waypoints are. 

    Below is a short chunk of code that demonstrates the issue.

    Any help would be appreciated.

    Thanks

    Bill.

    <!DOCTYPE html>
    <html>
        <head>
            <title>directionsCreateDrivingRouteHTML</title>
            <meta http-equiv='Content-Type' content='text/html; charset=utf-8'/>
        </head>
        <body>
            <div id="directionsPanel"></div>
            <div id='printoutPanel'></div>
            
            <div id='myMap' style='width: 700px; height: 500px;'></div>
            <script type='text/javascript'>
                function loadMapScenario() {
                    var map = new Microsoft.Maps.Map(document.getElementById('myMap'), {
                    credentials: <your map credentials here>,
                        center: new Microsoft.Maps.Location(47.606209, -122.332071),
                        zoom: 12
                    });
                    Microsoft.Maps.loadModule('Microsoft.Maps.Directions', function () {
                        var directionsManager = new Microsoft.Maps.Directions.DirectionsManager(map);
                        directionsManager.setRequestOptions({ routeMode: Microsoft.Maps.Directions.RouteMode.driving });
                        var waypoint = new Microsoft.Maps.Directions.Waypoint({ address: "130 main st, fort lee, nj" });
                        directionsManager.addWaypoint(waypoint);
                        var waypoint = new Microsoft.Maps.Directions.Waypoint({ address: "24 Central Ave, ROCHELLE PARK, NJ 07662" });
                        directionsManager.addWaypoint(waypoint);
                        var waypoint = new Microsoft.Maps.Directions.Waypoint({ address: "63 South Dr, ROCHELLE PARK, NJ 07662" });
                        directionsManager.addWaypoint(waypoint);
                        var waypoint = new Microsoft.Maps.Directions.Waypoint({ address: "25 Crescent St, ROCHELLE PARK, NJ 07662" });
                        directionsManager.addWaypoint(waypoint);
                        var waypoint = new Microsoft.Maps.Directions.Waypoint({ address: "16 Hobart Ct, ROCHELLE PARK, NJ 07662" });
                        directionsManager.addWaypoint(waypoint);
                        var waypoint = new Microsoft.Maps.Directions.Waypoint({ address: "87 Madison Ave, ROCHELLE PARK, NJ 07662" });
                        directionsManager.addWaypoint(waypoint);
                        var waypoint = new Microsoft.Maps.Directions.Waypoint({ address: "24 Schlosser Dr, ROCHELLE PARK, NJ 07662" });
                        directionsManager.addWaypoint(waypoint);
                        var waypoint = new Microsoft.Maps.Directions.Waypoint({ address: "76 South Dr, ROCHELLE PARK, NJ 07662" });
                        directionsManager.addWaypoint(waypoint);
                        var waypoint = new Microsoft.Maps.Directions.Waypoint({ address: "32 Fairfield Dr, ROCHELLE PARK, NJ 07662" });
                        directionsManager.addWaypoint(waypoint);
                        directionsManager.setRenderOptions({ itineraryContainer: document.getElementById('printoutPanel') });
                        directionsManager.showInputPanel('directionsPanel');
                        directionsManager.calculateDirections();
                    });
                    
                }
            </script>
            <script type='text/javascript' src='http://www.bing.com/api/maps/mapcontrol?branch=release&callback=loadMapScenario' async defer></script>
        </body>
    </html>



    Bill

    Tuesday, December 27, 2016 2:19 PM

Answers

  • Try using the experimental branch. I believe this was a known issue that has since been resolved in the experimental branch but due to holiday code freeze, hasn't been pushed to the released branch yet.

    [Blog] [twitter] [LinkedIn]

    Tuesday, December 27, 2016 6:40 PM

All replies