Great component! The one that works almost perfect! Trying to use it in re

Great component! The one that works almost perfect!
Trying to use it in the real project.
But I can’t get zoom and center values during map events.

Using:

map.onMoveEnd(event → {
map.getCenter().thenAccept((c) → log.info("center " + c.toString()));
// or
map.getZoom().thenAccept(zoom → log.info("zoom " + zoom));
});

leaves me with exceptions like
NPE in leaflet4vaadin.layer.Layer.fireEvent(Layer.java:152)
or
JsonParseException: Unrecognized token ‘elemental’
in leaflet4vaadin.LeafletMap.lambda$call$38d9bae9$1(LeafletMap.java:529)

Maybe I’m doing something wrong?
How can I get center + zoom values on every map move/zoom?

Hi,

I apologize for the inconvenience it’s clearly a bug. I created an issue on GitHub based on your description: https://github.com/Gubancs/leaflet4vaadin/issues/13 and I will fix this issue in the next release.

Thank you for your understanding

It works now!
Thank you very much!