You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am able to reroute the draw_marker or draw_line_string modes to draw circles when they are clicked, but the draw_polygon button remains routed to draw_circle, no matter where I try to overwrite it. I believe this is due to draw_circle using draw_polygon to draw the circle on the map.
For example, when I click the marker button, I made it draw a circle on the map. However, when I click the polygon button, it still draws a circle on the map instead of a regular polygon.
So, here's my question: Is it possible to overwrite a buttons for different drawing functionality? (EX: The marker button draws a circle and the polygon button draws a polygon, or the polygon button draws a circle and the line button draws a polygon, etc...)
Thanks!
The text was updated successfully, but these errors were encountered:
It sounds like you're trying to hijack an existing button in order to toggle a custom mode. Can you use a new/custom button instead of reusing an existing one?
Hi, so on my current setup I am using react-mapbox-gl with mapbox-gl-draw and mapbox-gl-draw-circle.
I am able to reroute the
draw_marker
ordraw_line_string
modes to draw circles when they are clicked, but thedraw_polygon
button remains routed todraw_circle
, no matter where I try to overwrite it. I believe this is due todraw_circle
usingdraw_polygon
to draw the circle on the map.For example, when I click the marker button, I made it draw a circle on the map. However, when I click the polygon button, it still draws a circle on the map instead of a regular polygon.
So, here's my question: Is it possible to overwrite a buttons for different drawing functionality? (EX: The marker button draws a circle and the polygon button draws a polygon, or the polygon button draws a circle and the line button draws a polygon, etc...)
Thanks!
The text was updated successfully, but these errors were encountered: