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.
- 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
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.
- 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)
- 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
<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.
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);
Starting the test/demo server:
- Run
mvn jetty:run
. - Open http://localhost:8080 in the browser.
Name: Gabor Kokeny
Email: [email protected]