none
Disable or custom waypoints in directions module RRS feed

  • Question

  • Hi,

    is there a way to disable or customize the waypoints of a route in bing maps ajax control v8? The documentation is quite confusing. It seems that the module list (v8) links to documentations of v7 (document, sidebar works fine): https://msdn.microsoft.com/en-us/library/mt748655.aspx

    When trying to set the directions manager render options each for waypointPushpinOptionsfirstWaypointPushpinOptions and lastWaypointPushpinOptions to visible: false, the waypoints still appear as "default" pushpin.

    When also setting the icon to an empty string for each waypointPushpinOptionsfirstWaypointPushpinOptions and lastWaypointPushpinOptions the icon changes into a small blue/white dots. This is not good but acceptable so far. Set it to invisible will be better ;-)

    But, there are still information labels with longitudes and latitudes rendered to the map and i can't figure out how to hide them...

    Thanks in advance!

    Thursday, June 15, 2017 1:41 PM

Answers

  • It will be in the next release as I mentioned. The release that just went out started before June 15th when I made the post but had issues and was delayed. This the confusion.

    [Blog] [twitter] [LinkedIn]

    Tuesday, June 20, 2017 6:14 PM
  • Waypoints don't have a pushpin option. Instead you can customize waypoints by using either the directions render options waypointOptions property or be using the route calculated event and then using the getAllPushpins function on the directions manager, then using setOptions on each individual pushpin.

    https://msdn.microsoft.com/library/mt750365.aspx

    https://msdn.microsoft.com/library/mt750375.aspx


    [Blog] [twitter] [LinkedIn]


    Friday, November 3, 2017 4:11 PM
  • The viable option currently does not work. A fix was just recently checked into the experimental branch and will be in the next update to the release branch.

    [Blog] [twitter] [LinkedIn]

    Thursday, June 15, 2017 3:56 PM

All replies

  • The viable option currently does not work. A fix was just recently checked into the experimental branch and will be in the next update to the release branch.

    [Blog] [twitter] [LinkedIn]

    Thursday, June 15, 2017 3:56 PM
  • Does this mean both, the waypoints and the long/lat labels can be customized or set to be invisible? Are there any new options added to the renderoptions which are not reflected to the documentation yet?
    Friday, June 16, 2017 10:57 AM
  • The documentation is up to date.

    [Blog] [twitter] [LinkedIn]

    Monday, June 19, 2017 6:43 PM
  • Hi,

    it seems that the release is done so far but it didn't fixed it... Waypoints are still visible using default pushpin layout when passing the following render options into the directions manager:

    directionsManager.setRenderOptions({
    	displayManeuverIcons: false,
    	displayPostItineraryItemHints: false,
    	displayPreItineraryItemHints: false,
    	displayRouteSelector: false,
    	displayStepWarnings: false,
    	showInputPanel: false,
    	waypointPushpinOptions: {
    		visible: false
    	},
    	firstWaypointPushpinOptions: {
    		visible: false
    	},
    	lastWaypointPushpinOptions: {
    		visible: false
    	},
    	walkingPolylineOptions: {
    		strokeColor: new window.Microsoft.Maps.Color(255, 182, 6, 16),
    		strokeThickness: 3,
    		strokeDashArray: '1 0'
    	}
    });


    • Edited by nrmnrsh Tuesday, June 20, 2017 5:31 PM
    Tuesday, June 20, 2017 5:31 PM
  • It will be in the next release as I mentioned. The release that just went out started before June 15th when I made the post but had issues and was delayed. This the confusion.

    [Blog] [twitter] [LinkedIn]

    Tuesday, June 20, 2017 6:14 PM
  • Thank you,

    that clears up my confusion so far. Is there any roadmap when the next release will be and what's planned to be in there – any public document?

    • Proposed as answer by Alessio pharma Thursday, November 2, 2017 6:43 PM
    • Unproposed as answer by Alessio pharma Thursday, November 2, 2017 6:43 PM
    Wednesday, June 21, 2017 7:51 AM
  • Sorry, the customization of the waypoint pushpin is an import point, can you tell me when the new version will be available? For the moment it does not work

    Thanks

    Alessio

    Thursday, November 2, 2017 6:46 PM
  • There has been several releases since my last post and custom waypoint work great now in both the experimental and release branches. What issue are you having? Can you provide and example?

    [Blog] [twitter] [LinkedIn]

    Friday, November 3, 2017 4:23 AM
  • Hi Ricky,

    thanks for your reply, in version 7 i changed the waypoint pushpin icon in this way:

    i defined the pushpin

    var pin = new Microsoft.Maps.Pushpin(center, {
                            typeName: "start",
                            icon: "../../img/Pushpin/start.png", height: 32, width: 32, anchor: new
                                     Microsoft.Maps.Point(16, 32),
                            draggable: true,   
                            });

    and then i changed it in this way


    startWaypoint = new Microsoft.Maps.Directions.Waypoint({ location: new Microsoft.Maps.Location(parseFloat(location12[0]), parseFloat(location12[1])), pushpin: pin });
                
    directionsManager.addWaypoint(startWaypoint, j);

    Friday, November 3, 2017 9:50 AM
  • Waypoints don't have a pushpin option. Instead you can customize waypoints by using either the directions render options waypointOptions property or be using the route calculated event and then using the getAllPushpins function on the directions manager, then using setOptions on each individual pushpin.

    https://msdn.microsoft.com/library/mt750365.aspx

    https://msdn.microsoft.com/library/mt750375.aspx


    [Blog] [twitter] [LinkedIn]


    Friday, November 3, 2017 4:11 PM
  • thanks, that works
    Monday, November 6, 2017 2:52 PM