Geomajas Community Documentation

Geomajas end user guide

Geomajas Developers and Geosparc

v1.8.0-SNAPSHOT


1. Introduction
2. Configuration
2.1. Dependencies
2.2. Google Maps layer configuration

The Google layer allows you to use Google maps imagery as a raster layer in Geomajas. There are three possible types of images which can be displayed,


A complete Google layer configuration looks as follows:



The layer info inner bean has the same general content as usual. There are some simplifications though. There is no need to provide resolutions or tile size (256x256 is always used). The crs should always be set to Mercator ("EPSG:900913").

On the layer, you can set the "satellite" or "physical" property to choose between using normal display (showing streets), satellite view (by setting this to "true"), or physical view (the modes are exclusive, last set will be valid). You can also set the maximum tile level on the layer, this defaults to 19 which is supported by Google in most places.

You can also set the display type using the dataSourceName parameter of layerInfo, for example for physical use G_PHYSICAL_MAP@GoogleLayer.

Note

You need to assure that you comply with Google's terms of use (see http://code.google.com/apis/maps/). Some of the things you need to do include adding the Google API code in your application (using a Google API key when not running on localhost), and (from the GWT face, using the GoogleAddon class to assure the copyright notes are displayed on the map.