While working on Ground Overlays, I noticed that it has a tag called <rotation>

 <?xml version="1.0" encoding="UTF-8"?>
    <kml xmlns="http://www.opengis.net/kml/2.2">
        <name>Large-scale overlay on terrain</name>
        <description>Overlay shows Mount Etna erupting on July 13th, 2001.</description>

My question is - can an image layer be rotated in 2D view? Following is the code I am using to add an Image and set its bounding box.

var options = {   
            'opacity': 1.0, 
            'isBaseLayer': false,
            numZoomLevels : 20 

        var image = new OpenLayers.Layer.Image(
            new OpenLayers.Bounds( groundOverlay.west, groundOverlay.south,  groundOverlay.east, groundOverlay.north),
            new OpenLayers.Size(1, 1),


Following the screen shot when above KML is displayed on my local system without rotation.

enter image description here

Google Maps does not seem to rotate the image, but Google Earth plugin does.

enter image description here

enter image description here


Openlayers can't display rotated images as Layer.Image. If you want to display rotated images, you can use as workaround a vector layer with point feature and externalGraphic.

Example of rotation:


And example of rotation with graphic:


And description for external graphic


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.