mapbox-controls
mapbox-controls copied to clipboard
Programatically use controls
I propose adding a property to the controls as an option where user can programatically enable controls without the need of adding them on the map. There's already a prop in mapbox-gl-draw which allows you to add DrawControl without adding the buttons as controls on the map – displayControlsDefault

You can use programmatically (measuringOn
, measuringOff
methods), and hide it from the map just to set display: none;
to .mapbox-control-ruler
class. Thanks for proposal, let's see if someone else needs this option.
Hey! I would also appreciate this option a lot. Makes it easier to add custom control buttons.
@kaareltinn Hi. Please wait till the war is over.
✅ https://www.npmjs.com/package/@mapbox-controls/ruler