Skip to content

vaadin-component-factory/vcf-leaflet

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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%