tangrams / tangram

WebGL map rendering engine for creative cartography
https://tangram.city
MIT License
2.2k stars 290 forks source link

Does Tangram consume mouse events? #779

Closed jimbok8 closed 3 years ago

jimbok8 commented 3 years ago

I am using Tangram as an additional baselayer in Leaflet maps to add features over a OSM layer. Tangram works fine and I can highlight features and have tooltips on hover over features. The problem is that I am also drawing polylines on the canvas layer using Leaflet and now the tooltips on these polylines no longer work. Are mouse events being consumed by Tangram? Thanks.

bcamper commented 3 years ago

Hmm, Tangram is just using Leaflet's own mouse handling for its hover events, e.g. https://github.com/tangrams/tangram/blob/d91cbb01d4a092f5671e6682d0f1d4701b7d96f2/src/leaflet_layer.js#L506. So I assume no, and don't recall running into this issue before, but I suggest you look at Leaflet's own event handling. If you find you need anything Tangram-specific (such as options or changes to use of Leaflet events), please feel free to re-open. Thanks.