manubb / Leaflet.PixiOverlay

Bring Pixi.js power to Leaflet maps
MIT License
463 stars 85 forks source link

Compatibility with Leaflet tooltips and popups #29

Closed claustres closed 5 years ago

claustres commented 5 years ago

Hi, I created a layer with this plugin containing a renderer of PIXI.mesh.Rope instances and tried to use bindTooltip() and bindPopup() without success. Not sure if it is related to events not being managed or underlying DOM container structure.

I've seen that in this example that popups are managed manually, but I did not find anything similar for tooltip. If someone can help detailing more how we could bring to PixiOverlay the tooltip/popup features of standard Leaflet layers it would be great.

Thanks for this great work anyway !

claustres commented 5 years ago

For those who are interested in a code sample you can have a look to https://github.com/kalisio/kMap/blob/master/src/client/leaflet/GradientPath.js. You need to implement interaction in Pixi then call relevant methods of Leaflet to display the tooltip/popup right. I think we can close this issue now.

image