无法排除地图框路线上的轮渡,通行费或高速公路

我正在使用mapbox-gl-directions,版本:4.0.2。我想排除通行费,渡轮或高速公路。这是一个文档:API,它说您可以传递exclude参数:

无法排除地图框路线上的轮渡,通行费或高速公路


但是,尽管这样传递它,却行不通:

new MapboxDirections({
      accessToken: this.accessToken,unit: 'metric',profile: 'mapbox/driving',flyTo: false,styles,controls: {
        inputs: false,instructions: false,profileSwitcher: false
      },exclude: 'ferry'
    });

有人知道如何通过吗?

glueyou 回答:无法排除地图框路线上的轮渡,通行费或高速公路

似乎mapbox-gl-directions插件不支持exclude=。提高this issue的方法正确。

,

我发送了一个pull request,它已成功合并。根据以下版本发布:4.0.3

本文链接:https://www.f2er.com/2913594.html

大家都在问