- FRAMEWORK SUPPORT: Polymer 3.0+Vaadin platform 10+
- Leaflet: https://leafletjs.com/
- Vaadin Add-on directory: https://vaadin.com/directory/component/leaflet4vaadin/
- Live demo: Coming soon
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.
- map configuration
- interactive layers
- map and layer events
- GeoJSON supports
- markers
- tooltip and popup binding
- layer groups
- vector layers
- dark theme
- map controls
- tile layers
- supports layer methods
- i18n supports
- supports leaflet plugins (for example: fullscreen plugin)
- leaflet editable plugin integration
- design and performance improvements
- bugfixes
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>leafletf4vaadin</artifactId>
<version>0.2.4-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]