mapbox/mapbox-gl-js

Mechanism to access existing controls in map

オープン

#7,682 opened on 2018/12/06

 (6 件のコメント) (0 件のリアクション) (0 人の担当者)JavaScript (2,203 件のフォーク)batch import
api :memo:feature :green_apple:good first issue

Repository metrics

Stars
 (10,532 個のスター)
PR merge metrics
 (PR metrics pending)

説明

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

コントリビューターガイド