mapbox / mapbox/mapbox-directions.js
Hide Control
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 58
- Forks
- 21
- PR merge metrics
- No merged PRs in 30d
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the directions control entry point and compare its control lifecycle with the other mapbox-gs-js controls that expose remove(). Check whether existing tests cover adding and removing controls. Done means the directions control can be hidden after being shown and can be used again in a single-page application.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100