mapbox/mapbox-gl-js

Mechanism to access existing controls in map

Open

#7.682 geöffnet am 6. Dez. 2018

Auf GitHub ansehen
 (6 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)JavaScript (2.203 Forks)batch import
api :memo:feature :green_apple:good first issue

Repository-Metriken

Stars
 (10.532 Stars)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

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