beso9595
beso9595

Reputation: 1174

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

I'm using 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:exclude property
But while passing it like this, it doesn't work:

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

Has anyone any idea how to pass it?

Upvotes: 1

Views: 369

Answers (2)

beso9595
beso9595

Reputation: 1174

I sent a pull request and it was merged successfully. Released under version: 4.0.3

Upvotes: 0

Steve Bennett
Steve Bennett

Reputation: 126255

It looks like the mapbox-gl-directions plugin doesn't support exclude=. You've done the right thing raising this issue.

Upvotes: 2

Related Questions