My goal is to develop a unique map annotation tool with custom controls, not relying on the built-in features of map providers.
Imagine something like this:
https://i.sstatic.net/70Yj7.gif
I had the idea of placing a canvas over the map for this purpose.
However, I encountered a challenge: when the overlay is present, zooming in and out on the map using the scroll wheel becomes disabled.
If I apply pointer-events: none
to the canvas, I lose the ability to draw on it as well.
To see a demo of the issue, visit: https://codepen.io/vandrieu/pen/qBqdpzX?editors=1010
Is there a way to allow drawing on the canvas while still enabling zoom functionality on the map through mouse scrolling?
How would you approach solving this dilemma?