aws-amplify / maplibre-gl-draw-circle

Supports drawing/editing a circle on a Mapbox map.
https://iamanvesh.github.io/mapbox-gl-draw-circle-test/
MIT License
14 stars 2 forks source link

Question: why Constants.types.POLYGON is used when calling activateUIButton? #16

Open ericxinzhang opened 1 year ago

ericxinzhang commented 1 year ago

Question

Why Constants.types.POLYGON is used in onSetup when calling the activateUIButton?

I am asking because I implemented drawing polygon and circle on map using mapbox-gl-draw and maplibre-gl-draw-circle, the money patch so as to add a circle button into the existing toolbar.

I created a demo here.

However because the POLYGON constant is used, now when I click on my circle button, the polygon button shows as selected (with the active class). Was it because mapbox-gl-draw (specifically ui.js) does not really support custom mode?