About
Fork me on GitHub
gwty-leaflet

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>0.5</version>
                     </dependency>
if you are using a snapshot version then you need to add the snapshots repository:

                    <repositories>
        <repository>
            <id>snapshots</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
            <releases>
                <enabled>false</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>
    </repositories>
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 The documentation writing is still under way.
Release
Documentation

1.0-SNAPSHOT

N/A

0.5

API

0.4

API