I need a way to access a registered control instance from Mapbox map instance.
For example, say I register a hypothetical Mapbox control:
const control = new IControl(); // Where IControl is the hypothetical mapbox control
map.addControl(control);
How do I access this control
instance in some other places in my codebase where I only have access to the map instance??
For context; I need to perform some map actions depending on some values only the control instance is aware of.
Thanks.