Skip to content

🌿 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.

License

Notifications You must be signed in to change notification settings

Gubancs/leaflet4vaadin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

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]

About

🌿 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.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published