v2.80: Making Image Overlays Easy with GGroundOverlay & GGeoXML

Monday, May 14, 2007 at 3:22:00 PM

In the past, developers who wanted to overlay an image on top of the map either had to use GTileLayerOverlay, creating tiles for each zoom level, or they had to use a user extension. Well, now, we're happy to introduce a quick & easy way to overlay images on the map by using the standalone GGroundOverlay function or by loading a KML file containing ground overlays with GGeoXML.

With GGroundOverlay or GroundOverlay in KML, you can specify a latitude/longitude bounding box to load an image (JPG/PNG/GIF) onto the map. Note that in the current implementation, the opacity and rotation values of the ground overlay can't be specified in the GGroundOverlay function and will be ignored by the GGeoXML renderer when found in a KML file.

If you're curious to see how your KML file that contains a ground overlay would look when rendered with GGeoXML, just try loading in the URL at maps.google.com. It should look the same when used on an API map. If you're new to ground overlays and want to play around, check out the "GroundOverlay resizer" utility below. It lets you enter in a URL, click "Add GroundOverlay," drag the corners around to resize, and then see either the KML or javascript equivalent of what's on the map.