Is it possible to have multiple pushpin icons in Bing-maps DirectionsManager?
I have this code which works and draws the route on the map:
Microsoft.Maps.loadModule('Microsoft.Maps.Directions', function () {
directionsManager = new Microsoft.Maps.Directions.DirectionsManager(myMap);
for (var i = 0; i < pinHandlers.length; i++) {
var title = 'test location';
var ph = pinHandlers[i];
var wp = new Microsoft.Maps.Directions.Waypoint({
address: title,
location: new Microsoft.Maps.Location(
ph.loc.latitude,
ph.loc.longitude
)
});
directionsManager.addWaypoint(wp);
}
// This sets the icon for all the points created above
directionsManager.setRenderOptions({
itineraryContainer: '#directionsItinerary',
waypointPushpinOptions: {
icon: '/assets/images/map-markers/delivery.PNG'
}
});
directionsManager.calculateDirections();
});
By the looks of the API, I can only change the push pin for all points within the route. I'd like to use different icons for each point if that is possible.