Google Earth map servlets
<Back home>
You can use 'proxy' like servlets in order to make your layers available to
the Google Earth client.
Since the version 0.707, the server support the superOverlays, which is an very
interresting feature of goodle earth.
There is at this time two types of Google Earth mapServlet:
1) the SimpleGoogleEarthServlet:
This one is basic, it produce a .kml reply which correspond
to the requested area, with an image URL pointing to a WMS mapserver.
The mapserver can be ANY WMS mapserver.
The image size will be fixed at 800*600 by default. This dimension can be changed
in the servlet parameters.
- 2) the GoogleEarthServlet:
This servlet contains an instance of the SimpleMapServer
layer catalogue. So it is able to optimize the reply in two way:
- it can make a .kml reply with an area smaller than
the one requested if the layer bounding box is smaller than
the request.
- if the layer bounding box is smaller than the request,
the image size may be reduced, to avoid sending oversampled pixels.
 Note that the GoogleEarth servlet NEED
to have the same initialisation parameters than the simpleMapServer (ie the
'mapServer.props' file).
3) the servlet superOverlay parameters:
You can define the following parameters in your google
servlets:
- image_width, image_width: the size of the region image
- wmsSerlvetName: the name of the WMS map servlet, it is in the same webapp as this servlet!
- minLodPixels: see KML spec 2.1. It's the minimum size of a region on the screen to have it visible. Default is 50.
- maxLodPixels: see KML spec 2.1. It's the maximum size. Default is -1, for infinite.
- numSubTiles: dividing number used for the subRegions. For both x and y axes. Default is 2.
- minLodPixelsMult: coefficient applied to the minLodPixels for the subRegions minLodPixels. default is 2.
After having configured the servlet(s), you have to add a network link
in Google Earth, pointing to your googleEarth servlet.
You can look at an example of '.kml' file here.
You can see that there are two Google mapServlet used: '/simpleMapServer/googleEarth',
and '/simpleMapServer/simpleGoogleEarth'.
The first one knows about the layers catalogue, the second one doesn't.
Important things about the network link:
- you have to escape the WMS & separator (into '&').
- it has to be WMS compliant.
This is an example with a vector layer, covering the entire world:

And with raster data, covering just Italy. Area and image size optimisation
is used in this case, especialy when we look from 'far away':

gilles.lavaux <at> serco <dot> com