Leaflet
Leaflet component provides a JAVA API for Leaflet maps library.
Description
JAVA API for Leaflet maps library.
Based on leaflet4vaadin.
Features
- map configuration
- interactive layers
- map and layer events
- markers
- tooltip and popup binding
- layer groups
- vector layers
- dark theme
- map controls (zoom, layers, scale)
- map state functions
- tile layers
- GeoJSON support
- support for Leaflet plugins:
- support for Esri Leaflet plugins:
- L.esri.DynamicMapLayer
- L.esri.TiledMapLayer
- L.esri.Vector.vectorBasemapLayer
Sample code
MapOptions options = new DefaultMapOptions(); options.setCenter(new LatLng(47.070121823, 19.204101562500004)); options.setZoom(7); LeafletMap leafletMap = new LeafletMap(options ); leafletMap.setBaseUrl("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"); add(leafletMap);
Links
Compatibility
Was this helpful? Need more help?
Leave a comment or a question below. You can also join
the chat on Discord or
ask questions on StackOverflow.
Version
Update to Vaadin 24
- Released
- 2024-03-11
- Maturity
- EXPERIMENTAL
- License
- Apache License 2.0
Compatibility
- Framework
- Vaadin 24+
- Vaadin 24.4 in 24.0.0
- Vaadin 23 in 1.0.1
- Vaadin 14 in 1.0.1
- Browser
- N/A
Leaflet - Vaadin Add-on Directory
Leaflet component provides a JAVA API for Leaflet maps library.Leaflet version 1.0.0
Initial release adding support for Esri Leaflet plugins (DynamicMapLayer, TiledMapLayer & vectorBasemapLayer)
Leaflet version 1.0.1
#### Bug fixes:
* Add missing add and remove events
* Add missing dependency package for esri plugin
Leaflet version 2.0.0
Update to Vaadin 24
Leaflet version 2.0.1
Fix an error with the production mode and devbundle for the plugins
Leaflet version 24.0.0
Warning: There are some breaking changes. Some classes have been removed because it relies on outdated libraries.
Remove GeoJSON extension because it's not working with the latest version of Jackson and the library is not maintained anymore with security issues.
Also removed the outdated leaflet-canvas-marker (updated 6 years ago) to avoid an issue with rbush and `CanvasIconLayer`.
It has been tested for Vaadin 24.4.