I am test driving Leaflet4j inside of JavaFX combo.
When I run the l4jfxdemo project and then drag the map the circle and polygon layers disappear. They do not disappear when zooming. I added a DragEndListener to enumerate the layers and they are still there but don't show on the map. When you zoom in or out you can see them appear for a brief moment.
I recompiled Leaflet4j with different versions of Leaflet but it made no difference. I also tried various map options as well as redrawing of the layers after panning but still no joy.
What could be causing this behaviour?
After the map dragging ends (when DragEndListener is triggered), try explicitly redrawing the layers. Sometimes, dragging the map might trigger a rendering issue that can be resolved by forcing a redraw.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With