不能排除 mapbox 路线上的渡口、收费站或高速公路

Can't exclude ferries, tolls or motorways on the mapbox route

我正在使用 mapbox-gl-directions, version: 4.0.2. I want to exclude tolls, ferries or motorways. Here is a documentation: API and it says you can pass exclude parameter:
但是像这样传递时,它不起作用:

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

有人知道如何通过吗?

mapbox-gl-directions 插件似乎不支持 exclude=。你做对了 this issue.

我发了一个pull request and it was merged successfully. Released under version: 4.0.3