首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >加载bing directions模块Angular

加载bing directions模块Angular
EN

Stack Overflow用户
提问于 2017-11-22 23:14:54
回答 0查看 188关注 0票数 0

使用bing地图,目前我可以创建地图添加图钉和更新图钉

我现在尝试做的是创建/更新路由,但是loadModule函数没有触发

代码语言:javascript
复制
  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
          }
        });

      });

正如我所说的,我可以做这样的事情;

代码语言:javascript
复制
this.map = new Microsoft.Maps.Map(...)

代码语言:javascript
复制
this.user = new Microsoft.Maps.Pushpin(...)
EN

回答

页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/47438138

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档