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
- Released
- 2021-11-19
- Maturity
- STABLE
- License
- Apache License 2.0
Compatibility
- Framework
- Vaadin 8.0+
- Vaadin 7.7+ in 1.0.4
- Vaadin 7.0+ in 1.0.8
- Browser
- Browser Independent