Skip to content

vaadin-component-factory/vcf-leaflet

This branch is 46 commits ahead of Gubancs/leaflet4vaadin:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

804d95d · Jan 12, 2024
Jul 6, 2020
Mar 16, 2020
Mar 7, 2020
Jun 5, 2020
Jan 11, 2024
Mar 20, 2020
Mar 7, 2020
Mar 17, 2020
Dec 20, 2023
Mar 20, 2020
Mar 20, 2020
Jan 12, 2024

Repository files navigation

Leaflet for Vaadin

Leaflet for Vaadin component provides a JAVA API for Leaflet maps library.

This component is based on leaflet4vaadin.

Features

Using the component in a Flow application with maven

Add the following dependencies in your pom.xml file:

<dependency>
   <groupId>org.vaadin.addons.componentfactory</groupId>
   <artifactId>vcf-leaflet</artifactId>
   <version>X.Y.Z</version>
</dependency>
<repository>
   <id>vaadin-addons</id>
   <url>https://maven.vaadin.com/vaadin-addons</url>
</repository>

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

See more examples on vcf-leaflet-demo.

Development instructions

Starting the test/demo server:

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

License

This Add-on is distributed under Apache Licence 2.0.

Sponsored development

Major pieces of development of this add-on has been sponsored by multiple customers of Vaadin. Read more about Expert on Demand at: Support and Pricing.

About

vcf-leaflet provides a Java API for Leaflet.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 96.1%
  • JavaScript 3.5%
  • Other 0.4%