gwty-leaflet
Description
gwty-leaflet is a GWT wrapper for the famous maps javascript library Leaflet. gwty-leaflet is based on JsInterop and allows using Leaflet from your GWT application exactly the same way as from a javascript script with a slight advantage: static typing. It was partially auto generated from Leaflet docs.
Requirements
- GWT 2.8.x
- JDK 1.8
QuickStart
First of all, you need to import the library into your project either as a maven dependency or you can download the jar from maven central
<dependency>
<groupId>com.gwidgets</groupId>
<artifactId>gwty-leaflet</artifactId>
<version>1.0</version>
</dependency>
Then, you can you can start creating maps and leaflet Objects using the L master class. For example:
L.map("map", new MapOptions.Builder().build())
.setView(L.latLng(51.505, -0.09), 12, new ZoomPanOptions.Builder().build());
You can refer to our quick starter guide project for a working example: https://github.com/gwidgets/gwty-leaflet-starter-guide