使用bing地图,目前我可以创建地图添加图钉和更新图钉
我现在尝试做的是创建/更新路由,但是loadModule函数没有触发
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
}
});
});正如我所说的,我可以做这样的事情;
this.map = new Microsoft.Maps.Map(...)或
this.user = new Microsoft.Maps.Pushpin(...)https://stackoverflow.com/questions/47438138
复制相似问题