mapbox / mapbox/mapbox-gl-js

Mechanism to access existing controls in map

Open
#7,682 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

api :memo: feature :green_apple: good first issue
Dominant language
TypeScript
Stars
12.4k
Forks
2.4k
PR merge metrics
No merged PRs in 30d

Description

Motivation

I'm trying to implement a utility function to solve #6531: map.U.lockRotation().

Because the navigation control would have already been constructed and added to the map, it's too late to just not add it. Hence I need to find the existing navigation control and either modify it, or remove it then re-add it.

Design Alternatives

  • map.getControl(mapboxgl.NavigationControl) ?

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 with the map and NavigationControl API referenced in this issue, then review the requirements in #6531. Define a supported way to access an existing control so it can be modified or removed and re-added after construction; completion should include a clear API behavior for that workflow.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api, frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.