Table of Contents
GWT-OpenLayers developer reference
Building GWT-OpenLayers from source in two steps
Required software:
- Mercurial commandline client
- Maven 2.0.8 or up
Step 1. Grab the source from the Mercurial repository using
hg clone http://gwt-openlayers.hg.sourceforge.net:8000/hgroot/gwt-openlayers
Step 2. Open a commandline prompt at the gwt-openlayers directory
mvn package
Maven should sort out the dependencies for you :-)...
Setting up a development environment for GWT-OpenLayers
-- Mercurial
GWT-OpenLayers uses the Mercurial version control system.
http://apps.sourceforge.net/trac/sourceforge/wiki/Mercuria
Mercurial is a distributed version control system (DVCS). For more info on DVCSs see:
http://betterexplained.com/articles/intro-to-distributed-version-control-illustrated/
For read access to Mercurial, first install the Mercurial commandline client. Binary packages for different platforms can be found at:
http://www.selenic.com/mercurial/wiki/
(see 'Getting Started' on the mercurial wiki)
There is a system wide configuration file for the Mecurial commandline client called 'Mercurial.ini' in the folder where you installed Mercurial. You should edit the username, otherwise Mercurial will use a default username for commits. According to this page https://sourceforge.net/apps/trac/sourceforge/wiki/Mercurial, sourceforge users should commit to their project repository using their SourceForge.net username or email address (USERNAME@…). In addition to editing the username, specify a merge program (http://www.selenic.com/mercurial/wiki/MergeProgram). If no merge program is specified Mercurial will look for an applicable tool on your system and use that tool. DiffMerge a nice free 'merge' tool that runs on Windows, Mac OS, and Unix (as from version 3.3 DiffMerge is free: http://www.sourcegear.com/diffmerge/)
To check if hg is configured properly execute:
hg showconfig
-- OpenSSH
For write access to Mercurial you will also be needing ssh. On most Linux platforms ssh is default available (as far as the author knows), however on windows platforms you will need to install ssh. Windows users are recommended to install:
http://sshwindows.sourceforge.net/ (disclaimer: sshwindows does not play nice with CygWin if you have that installed).
(if someone knows how Mercurial can work with Putty or the like... sent a mail to 'command.edwin AT gmail.com' and I will edit the info in, or give you the rights to edit the page). Add the path to the OpenSSH\bin dir, to the windows path system variable.
Make sure ssh is on the windows path, by opening a command prompt and executing:
ssh -v
When you pull from or push to the repository, you will be prompted for your password when you do not have an SSH key configured, so it's convenient to configure one.
Describe how to setup SSH key with OpenSSH here (just a few steps)
See: https://sourceforge.net/apps/trac/sourceforge/wiki/SSH%20keys
To store your password for push/pull you need to edit the URL in the <hg-clone>/.hg/hgrc file:
[paths] default = ssh://username:password@gwt-openlayers.hg.sourceforge.net/hgroot/gwt-openlayers # NOTE: this doesn't seem to work ... # try this http://sial.org/howto/openssh/publickey-auth/
For more information about Mercurial, see also:
http://hgbook.red-bean.com/
An overview of OpenLayers/GWT-OpenLayers
Some words about how it all hangs together...
First some words about OpenLayers:
An UML class diagram of OpenLayers 2.7 is available on the OpenLayers wiki. This class diagram shows how OpenLayers is structured at a high level:
http://trac.openlayers.org/wiki/UML
The central class in OpenLayers is the Map class. In GWT-OpenLayers...
Diving into GWT-OpenLayers
The central classes for wrapping OpenLayers are JSObjectWrapper and OpenLayersObjectWrapper.
Getting started
If you are new to JSNI, first read ...
Everything in GWT-OpenLayers is a JSObjectWrapper...
Recommended reading:
...
...