-
Notifications
You must be signed in to change notification settings - Fork 26
Add control icon #9
Copy link
Copy link
Open
Description
A control default button to be visible in the toolbar can be added using the activateUiButton method. This way, using the following react component would work and the draw rectangle mode would be available in the toolbar:
const modes = MapboxDraw.modes
modes['draw_rectangle'] = DrawRectangle;
// ...
<MapboxDraw>
modes={modes}
displayControlsDefault={false}
controls={{
polygon: true,
trash: true,
rectangle: true // custom control display
}}
</MapboxDraw>Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels