Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Custom Controls Icons on the existing toolbar #1108

Open
jo-chemla opened this issue May 19, 2022 · 0 comments
Open

Add Custom Controls Icons on the existing toolbar #1108

jo-chemla opened this issue May 19, 2022 · 0 comments
Labels

Comments

@jo-chemla
Copy link

jo-chemla commented May 19, 2022

Hi there! On current mapbox-gl-draw version with a custom control set-up, it is not straightforward to add to the mapbox-draw toolbar a button/icon that, when selected, triggers the drawMode change corresponding to that custom control.

I was able to setup a drawRectangle control with some help from miller here , and can set the defaultMode: 'draw_rectangle', to use it when map loads. But adding a custom button that calls my custom draw control can't be done right away.

Note: hiding the existing toolbar and adding a custom one like mentioned here seems to be the way to go at the moment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants