2017-11-22 4 views
0

bing Maps, im Moment habe ich eine auf die Pins hinzufügen erstellen und aktualisieren StifteLaden bing Richtungen Modul Angular

Was ich versuche jetzt zu tun ist,/update Routen erstellen, aber die LoadModule- Funktion nicht Feuer

Microsoft.Maps.loadModule('Microsoft.Maps.Directions', function() { 
     //Create an instance of the directions manager. 
     this.directionsManager = new Microsoft.Maps.Directions.DirectionsManager(this.map); 

     console.log(this.directionsManager)//This doesn't show 

     //Set the request options that uses kilometers. 
     this.directionsManager.setRequestOptions({ 
      distanceUnit: Microsoft.Maps.Directions.DistanceUnit.km 
     }); 
     //Make the route line thick and green. 
     this.directionsManager.setRenderOptions({ 
      drivingPolylineOptions: { 
      strokeColor: 'green', 
      strokeThickness: 6 
      } 
     }); 

     }); 

Wie ich sage kann ich Dinge wie tun;

this.map = new Microsoft.Maps.Map(...) 

Oder

this.user = new Microsoft.Maps.Pushpin(...) 

Antwort

0

Das Problem war, die ich hatte

Microsoft.Maps.loadModule(..) 

Um

Microsoft.Maps.Module.loadModule(...) 
zu ändern