V-Leaflet
Leaflet slippy map integration for Vaadin
V-Leaflet provides a Java API for Leaflet, which is a popular slippymap implementation, similar to OpenLayers or Google Maps. Although it might not have all bells and whistles of OpenLayers, Leaflet is lightweight and shines on mobile devices. Also it has an extensive set of add-ons, of which many are available for Vaadin too.
See full-stack usage example, based on Spring Data JPA and spatial extensions of Hibernate.
Add-on supports geometry types from the popular JTS Topology Suite. Those can be used as an alternative API to control V-Leaflet components and make it simpler to integrate with advanced GIS systems.
Since version 0.6.0 editing features have been moved to separate v-leaflet-draw add-on. Depend on that if you need the more advanced editing features. There are also some existing Field implementations for JTS geometry types to make bean binding simpler and a utility class to make non automatic integrations easier.
Why should you use Leaflet over its "competitors" like Google Maps or OpenLayers?
- liberal business friendly licensing (free for intranet apps and "non public apps", unlike Google Maps)
- Lightweight JS core that works well on mobile devices.
With this Vaadin add-on you can use LeafletJS with the server side Java you know best. The add-on also has a preliminary support for Leaflet.Draw plugin. See instructions for its usage from the project page.
Big thanks to major contributors like ocatavm, willtemperlay & jtreml !
Major versions/branches
- 1.X series: Vaadin 7
- 2.X series: Vaadin 8
- 3.X series: Vaadin 8 with JTS dependency from LocationTech project
- With Vaadin Flow (Vaadin 10+), use LeafletMap for Vaadin by XDEV Software.
Links
- Another editing add-on
- FlyTo feature demo in youtube
- Author Homepage
- Project page at github
- Online Demo
- g-leaflet - Lightweight GWT API for Leaflet on which this is based on
- Leaflet, the real workhorse behind all this
- "Full stack" usage example with JPA entities
- Test and usage examples
- Marker cluster add-on
- Google Maps base layer add-on
- Editing add-on
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
bearer auth support for tile server
- Released
- 2024-08-13
- Maturity
- STABLE
- License
- Apache License 2.0
Compatibility
- Framework
- Vaadin 8.0+
- Vaadin 7.7+ in 1.0.4
- Vaadin 7.0+ in 0.0.1
- Browser
- Browser Independent
V-Leaflet - Vaadin Add-on Directory
Leaflet slippy map integration for VaadinFlyTo feature demo in youtube
Author Homepage
Project page at github
Online Demo
g-leaflet - Lightweight GWT API for Leaflet on which this is based on
Leaflet, the real workhorse behind all this
"Full stack" usage example with JPA entities
Test and usage examples
Marker cluster add-on
Google Maps base layer add-on
Editing add-on
V-Leaflet version 0.0.2
Fixed some issues with dynamic updates to displayed markers.
V-Leaflet version 0.0.3
* added basic support for layer groups
* fixed bug in Bounds
* fixed theming issue in layer control
* unstyled polylines now visible
* added getter for zoom level
V-Leaflet version 0.0.4
Jar built so that vaadin.com/directory hopefully don't mess with pom files.
V-Leaflet version 0.0.5
Fixed regression in dynamic updates to certain layers and some other bugs
V-Leaflet version 0.0.6
Fixed Vaadin Directory maven support stuff (shaded pom not used -> widgetset compilation problems if gwtl project not installed). Now "shaded" dependency declared as optional as a workaround. Also made some shared classes Serializable.
V-Leaflet version 0.0.7
Fixed a bug that causes weird "auto scrolling effect" in some cases.
V-Leaflet version 0.0.8
Now uses Leaflet 0.6
V-Leaflet version 0.0.9
Leaflet is now notified better on each size change. This might have caused e.g. missing tiles in some situations.
V-Leaflet version 0.1.0
* Switched to a different JavaScript overlay based GWT Leaflet integration
* Refactored layers. No more "BaseLayers", use LTileLayer and LWmsLayer instead. Base layers and "normal layer" are now distinguished by how they are added to LMap. Use addBaseLayer method for base layers
* Fixed issue 9
* Lots of other small cleaning and changes
V-Leaflet version 0.2.0
Preliminary support for Leaflet.Draw
V-Leaflet version 0.3.0
Updated underlaying Leaflet library and bug fixes.
V-Leaflet version 0.4.0
* Drawing of a specific vector type can now be initiated without adding the draw toolbar
* Added several configuration properties for vectors
* Packaging now has draw features enabled by default and they can be disabled to optimise some kilobytes if drawing functionality is not needed
* Lots of small bugfixes and enhancements
V-Leaflet version 0.4.1
Fixed regression with layer groups
V-Leaflet version 0.5.0
JTS Topology Suite integration (big thanks to willtemperley) and update to V-Leaflet 0.7.1
V-Leaflet version 0.5.1
* Fixed vector styling issues in IE
* Added sanity check to LMap.zoomToContent()
V-Leaflet version 0.5.2
Added support for CRSTranslators to JTS fields
V-Leaflet version 0.5.4
Bugfixes, small improvements and update to Leaflet 0.7.2
V-Leaflet version 0.5.5
Popups now also without Marker ("standalone" popup") and also tied to paths. Lots of small improvements and bug fixes.
V-Leaflet version 0.5.7
Lots of essential improvements and bug fixes mostly contributed by the amazing community of this add-on. Thanks! See project page for changes.
V-Leaflet version 0.6.0
* updated LeafletJS version
* Leaflet.Draw related features split to separate add-on
V-Leaflet version 0.6.2
Added "ImageOverlay" layers. Handy for putting old maps on top of background layers or just as a handy image viewer component for large images.
V-Leaflet version 0.6.3
See github for changes
V-Leaflet version 1.0.0-b1
First version against Leaflet JS 1.0 branch. Will be beta as long as Leaflet JS is, but it is very stable already.
V-Leaflet version 1.0.0-b2
Fixed a regression in Bounds object
V-Leaflet version 1.0.0-b3
Improved mouse events and context menu events, improved Popups
V-Leaflet version 1.0.0-b4
See github changes for more details
V-Leaflet version 1.0.0-b5
null
V-Leaflet version 1.0.0-b6
null
V-Leaflet version 1.0.0-b7
null
V-Leaflet version 1.0.0-rc1
null
V-Leaflet version 1.0.0-rc2
See github for changes
V-Leaflet version 1.0.0-rc3
null
V-Leaflet version 1.0.1
See github for changes
V-Leaflet version 2.0.0.rc1
null
V-Leaflet version 2.0.0
First build to be considered stable for Vaadin 8.
V-Leaflet version 2.0.1
See github for changes
V-Leaflet version 2.0.3
* Updated LeafletJS to 1.3.0
* Added API for better functioning editing plugings
* bug fixes
V-Leaflet version 1.0.7
Back-ported fixes and features to Vaadin 7 branch
V-Leaflet version 3.0.0
First with JTS dependency changed to the Eclipse locationtech namespace
V-Leaflet version 1.1.0
A release for V7 series with LocationTech JTS dependency.
V-Leaflet version 1.1.2
bearer auth support for tile server