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

[Bug] Draw Polygon calls onClick for Map when drawing #2331

Open
croossin opened this issue Dec 24, 2023 · 0 comments
Open

[Bug] Draw Polygon calls onClick for Map when drawing #2331

croossin opened this issue Dec 24, 2023 · 0 comments
Labels

Comments

@croossin
Copy link

Description

When following this example and putting the DrawControl inside the Map, I cannot get the polygon to be drawn on the screen if the Map has an onClick prop. That will take priority of drawing on the screen. If I remove onClick, the polygon can be drawn.

Expected Behavior

To be able to have an onClick as well as a be able to draw a polygon. If the polygon drawing tool is selected, onClick should be ignore. How else can you respond to a maps click and have polygon draw functionality? They seem that they should be able to live in unison?

Steps to Reproduce

https://codesandbox.io/p/sandbox/laughing-mclaren-tc66sp

Environment

  • Framework version: 7.1.0
  • Map library: Any
  • Browser: Chrome
  • OS: Mac

Logs

No response

@croossin croossin added the bug label Dec 24, 2023
@croossin croossin changed the title [Bug] Draw Polygon doesn't draw if Map has onClick [Bug] Draw Polygon calls onClick for Map when drawing Dec 24, 2023
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

1 participant