leaflet4vaadin icon indicating copy to clipboard operation
leaflet4vaadin copied to clipboard

:herb: Leaflet4Vaadin :herb: provides a Java API for Leaflet, which is a popular map implementation, similar to Google Maps. Leaflet is lightweight and shines on mobile devices. Also it has an extens...

Nowadays I'm very busy, unfortunately, I have no enough time to enhance this awesome Vaadin add-on. But its source code is available on GitHub so you can contribute if you have a feature request. Currently, this addon may have a lot of bugs so I don't recommend using this in a production environment. Of course, if you create a pull request on GitHub I will merge and release it if you want. Thank you for your understanding.

Java CI with Maven Vaadin Directory

Published on vaadin.com/directory Star on vaadin.com/directory Rating on vaadin.com/directory Rating count on vaadin.com/directory Latest version on vaadin.com/directory Latest release date on vaadin.com/directory Code Quality Score Code Grade

leaflet4vaadin

  • FRAMEWORK SUPPORT: Polymer 3.0+Vaadin platform 14+
  • Leaflet: https://leafletjs.com/
  • Vaadin Add-on directory: https://vaadin.com/directory/component/leaflet4vaadin/
  • Live demo: https://leaflet4vaadin.herokuapp.com/
  • Source Code Example with Vaadin Flow V15: https://github.com/Gubancs/leaflet4vaadin-demo
  • Feel free to donate: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=8M9BEK428U6AW&source=url
Lichess homepage

Leaflet4Vaadin provides a Java API for Leaflet, which is a popular map implementation, similar to Google Maps. 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. With this Vaadin add-on you can use LeafletJS with the server side Java you know best, and you can easily extend it or just implement your custom plugins and integrate them.

Core 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
  • supports Leaflet plugins (eg.: fullscreen, heatmap, markercluster)

Future improvements

  • i18n support
  • leaflet draw integration
  • design and performance improvements
  • use Typescript on client-side instead of JS
  • supports parameters in custom events
  • selenium ui tests
  • more examples
  • bugfixes
  • documentation

Using with maven

<dependency>
   <groupId>com.vaadin</groupId>
   <artifactId>leaflet4vaadin</artifactId>
   <version>0.3.0-beta</version>
</dependency>

<repository>
   <id>vaadin-addons</id>
   <url>https://maven.vaadin.com/vaadin-addons</url>
</repository>

Copy the above dependencies to your Maven pom.xml If you have any issues installing, please contact me.

Example usage

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);

Development instructions

Starting the test/demo server:

  1. Run mvn jetty:run.
  2. Open http://localhost:8080 in the browser.

Contact

Name: Gabor Kokeny

Email: [email protected]