Vaadin Map

The Map component is based on OpenLayers and we would like to make use of some of OpenLayers wast selection of plugins.
Have anybody implemented such a plugin in Vaadin or is there a tutorial or anything that we can follow that anybody here know of?

Hey, in theory it’s possible to include some Javascript that imports a plugin and then adds something from it to the OpenLayers map instance. The OL map is available on the vaadin-map element under the configuration property. Here is a cookbook example that does work with the OL map directly: https://cookbook.vaadin.com/map-marker-drag-drop
In practice this is not officially supported, and can break at some point. As the Map Flow component manages the OL map configuration, it can happen that a synchronization from the Flow component to the OL map will overwrite any manual changes applied to it using Javascript. For example, if you would add a layer to the OL map using Javascript, and then make a change to the layers collection on the Flow side, it would remove the custom added layer.
In the future the Map component could support some sort of extension mechanism that allows you hook into the synchronization mechanism and create corresponding Java classes for stuff from plugins, but there are no concrete plans for that ATM.

Thanks I will have a look at the Cookbook reference.

Some time back I was interviewed by a Vaadin employee about our needs regarding a Map component. This was pre map component development. I specifically mentioned the need for something like heatmap/cluster functionality. I was told that this would be possible and I really hope that will be the case. I think most developers would like to have the option to add stuff past vanilla map functionality. The simpler the better. Also I would not want to become a maintainer for some Map component plugin.

We started using leaflet4vaadin with a heat component but we would rather be able to use Vaadin Map Component with more or less the same functionality if possible. Map with markers only takes us so far.