mapbox / mapbox/mapbox-directions.js

Hide Control

Open
#104 1 comment 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.