Problem clearing directions


i seem having problems clearing directions, no doubt it's somthing silly doing

0x800a01b6 - javascript runtime error: object doesn't support property or method 'resetdirections'

this sort of doing

  microsoft.maps.loadmodule('microsoft.maps.directions', function () {                  var directionsmanager = new microsoft.maps.directions.directionsmanager(bingmap);                  // set route mode driving                  directionsmanager.setrequestoptions({ routemode: microsoft.maps.directions.routemode.driving });                  var waypoint1 = new microsoft.maps.directions.waypoint({ address: 'home', location: new microsoft.maps.location(52.8437614440918, -1.33560001850128) });                  var waypoint2 = new microsoft.maps.directions.waypoint({ address: 'system.web.ui.htmlcontrols.htmlgenericcontrol', location: new microsoft.maps.location(55.558349609375,-2.0686399936676) });                  directionsmanager.addwaypoint(waypoint1);                  directionsmanager.addwaypoint(waypoint2);                  // set element in itinerary rendered                  directionsmanager.setrenderoptions({ itinerarycontainer: document.getelementbyid('printoutpanel') });                  directionsmanager.calculatedirections();                                   //directionsmanager.cleardisplay();                  directionsmanager.resetdirections();              });

works fine apart resetdirections bit. in reality wont in function, want figure out first

resetdirections not function in directions manager. use cleardisplay or clearall: https://msdn.microsoft.com/en-us/library/mt750375.aspx

[blog] [twitter] [linkedin]



Bing Maps  >  Bing Maps Web Controls



Comments

Popular posts from this blog

Azure DocumentDB Owner resource does not exist

BizTalk Server 2013 Azure VM Log Shipping and HA for hosts

How to Share webservice object to all user