A lightweight mapping alternative to popular mapping APIs like Google Maps and OpenLayers.
The library uses Leaflet, an open-source javascript library for mobile-friendly interactive maps by CloudMade, to implement a collection of mapping Widgets which GWT projects can use to implement mapping capabilites on the client-side of a GWT application. The Leaflet API is a third-party javascript and is integrated with GWT as Java classes using JSNI and Type Overlays.
Warning: This project is in flux. API, module structure and names can change at any time!
###Milestones###
- v0.1 (Medio Sep 2012) - Core parts of Leaflet API exposed
- v0.2 (Primo Nov 2012) - All relevant parts of Leaflet API exposed, start publishing snapshots (maven + jars)
- v0.3 (Ultimo Dec 2012) - Widgets: geolocation (field), first official release (maven + jars).
###Core Module###
Dependency: Leaflet 0.4.5
Following parts of Leaflet API are implemented:
- L.Map - Leaflet Map class (partial)
- ILayer - Common layer interface
- L.TileLayer - Common Tile layer class
- L.TileLayer.WMS - WMS layer class
- IControl - Common control interface
- L.Control.Layers - Layer switcher control class
- L.Control.Attribution - Map and layer attribution class
- L.Control.Scale - Simple legend control class
- L.Control.Zoom - Simple zoom control class
- L.Point - Map point (coordinates in pixels)
- L.LatLng - Geographical point
- L.Transformation - Affine transformation
- ICRS - Coordinate reference system interface
- L.CRS - Base CRS class
- L.CRS.EPSG3395 - EPSG:3395
- L.CRS.EPSG3857 - EPSG:3857
- L.CRS.EPSG4326 - EPSG:4326
- L.CRS.Simple - Simple CRS (lat and lng into x and y directly)
###Widget Module (GWT)###
- MapWidget - GWT Widget displaying a Map instance (available from WindowBuilder Editor palette)
###Proj4 Module (GWT)###
Dependency: Proj4Leaflet master/74a5a8b170ff58e635cba139cfaa25cd4cd5d022 (git)
- Proj4 - Custom (local) CRS factory plugin to Leaflet (Proj4Leaflet)
###Search Module (GWT)###
Dependency: leaflet-search master/3b717c6ff2bbd5ad19ba4f851c152f67ca62b97d (git)
- Leaflet Search - Simple search plugin for Leaflet (leaflet-search)
###Label Module (GWT)###
Dependency: Leaflet.label master/3c13acff459c36a222e9fdefd718af95396a0a9f (git)
- Leaflet label - Simple label plugin for Leaflet (Leaflet.label)
Goto gwtl-example.appspot.com to see a running example of the GWT example project.
This Git project structured as a Maven multi-gwt-module project setup, (see working with maven) and is developed using
- Maven (3.0.4)
- Maven GWT Plugin - automatically downloaded by maven
- Eclipse IDE for Java Developers (3.7.2)
- Google Eclipse Plugin
- Window Builder Pro
- EGit
- Maven Integration for Eclipse 1.2
- Maven Integration for Eclipse WTP (Incubation) 0.16.0
Ensure that these are all installed and ready before you continue. To install from scratch, just
- Download and install Eclipse
- Download P2 software file import file and start Eclipse
- Open File -> Import -> "Install Software Items from File" wizard
- Enter path to p2f file downloaded in step 2
- Check "Contact all update sites during install to find required software"
- Press enter and follow the instructions.
When you are all done, just (linux)
- fork this repo on github
- clone the fork locally -
git clone https://github.com/<username>/gwt-leaflet.git
- change directory to -
cd gwt-leaflet/src
- and run the command -
mvn package
which should automatically download some stuff for you and prepare the projects for import into Eclipse.
- Switch to Eclipse and select File -> Import...
- Select Maven -> Existing Maven Projects
- Select Browse ... -> gwt-leaflet/src
- Finish
which should import all projects into current workspace.
You find more information in the developer guide.