mapbox-directions.js icon indicating copy to clipboard operation
mapbox-directions.js copied to clipboard

Hide Control

Open yvanvds opened this issue 9 years ago • 1 comments

Could you provide a method to hide this control after showing it? The other mapbox controls in mapbox-gs-js can easily be hided with their remove() method (inherited from the base control class). Only the directions control cannot.

I understand this is an extension and it's not part of mapbox itself, but it in a single page application it is a bit problematic if the control can not be hidden at certain views.

yvanvds avatar Jul 19 '16 15:07 yvanvds

The other mapbox controls in mapbox-gs-js can easily be hided with their remove() method (inherited from the base control class).

To clarify, are you using this code or https://github.com/mapbox/mapbox-gl-directions ? This repository, for mapbox-directions.js, matches Mapbox.js, not Mapbox GL JS.

tmcw avatar Sep 18 '16 17:09 tmcw