Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide Control #104

Open
yvanvds opened this issue Jul 19, 2016 · 1 comment
Open

Hide Control #104

yvanvds opened this issue Jul 19, 2016 · 1 comment

Comments

@yvanvds
Copy link

yvanvds commented Jul 19, 2016

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.

@tmcw
Copy link
Contributor

tmcw commented Sep 18, 2016

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants