mapbox/mapbox-gl-js

Mechanism to access existing controls in map

Open

#7 682 ouverte le 6 déc. 2018

Voir sur GitHub
 (6 commentaires) (0 réactions) (0 assignés)JavaScript (2 203 forks)batch import
api :memo:feature :green_apple:good first issue

Métriques du dépôt

Stars
 (10 532 stars)
Métriques de merge PR
 (Aucune PR mergée en 30 j)

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) ?

Guide contributeur