Everything is on SourceForge (http://sourceforge.net/projects/gwt/) and
I'm looking for any help I can get on enhancing the implementation,
testing, and doing documentation. Please e-mail me if you are
interested in joining the project!
To use the API :
1.) Downlod googleMaps.jar from
http://sourceforge.net/project/showfiles.php?group_id=169331
2.) Add googleMaps.jar to your project's classpath
3.) Add the following line into your module:
<inherits name='com.mapitz.gwt.googleMaps.GoogleMaps' />
4.) To the HTML file's HEAD you intend to display a map on add the
google maps java script file along with your key (hopefully this is a
requirement that will go away)
Example:
<script
src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAA2uVP_UOqpQ8kN5UusRJxtRTb-vLQlFZmc2N8bgWI8YDPp5FEVBTeVqWarvzWD3SO7oLG9SYKPHZvRg"
type="text/javascript"></script>
5.) Ensure there is a <DIV id="map"> in your code... (Google Maps is a
little funny if you use a dynamically created DIV... which the code can
currently do... but the centering is off... not sure where the bug
lies, but it's not pretty, so to avoid it... do this step)
6.) Work with the API in your code
To get started with the API:
//Retrieve an existing DIV object from your HTML by name
Element e = RootPanel.get("map").getElement();
//Insantiate the GMap2 widget
GMap2 gmaps = new GMap2(e);
//If you are brave and don't mind centering issues
//GMap2 gmaps = new GMap2();
//Create a center position to center on (some methods do not work
on the map if you are not centered)
GLatLng pos = GLatLng.create(37.4419, -122.1419);
gmaps.openInfoWindowHtml(pos, "The center of the world");
gmaps.setCenter(pos);