[OpenLayers-Users] How to Rotate an image

Arnd Wippermann arnd.wippermann at web.de
Wed Nov 13 09:16:31 PST 2013


Hi,

You have to add a point feature to your vector layer, to which the style
will applied 
and declare a baselayer:

...

    vectorLayer.isBaseLayer=true; //or allOverlays:true in the map object 

    map = new OpenLayers.Map( 'map', {
        //allOverlays:true,
        controls: [
            new OpenLayers.Control.PanZoom(), 
            panel]
    });
    var geometry = OpenLayers.Geometry.fromWKT("POINT(0 0)");
    var feature = new OpenLayers.Feature.Vector(geometry);
    vectorLayer.addFeatures([feature]);

    map.addLayers([vectorLayer]);

...
 
Arnd

-----Ursprüngliche Nachricht-----
Von: openlayers-users-bounces at lists.osgeo.org
[mailto:openlayers-users-bounces at lists.osgeo.org] Im Auftrag von Josep
Sanmartí
Gesendet: Mittwoch, 13. November 2013 12:04
An: openlayers-users at lists.osgeo.org
Betreff: [OpenLayers-Users] How to Rotate an image

Hello all,

Once added an image and a custom button, I'm interested about how to rotate
the image. I've read that an image can't be rotated unless is defined as a
vector. I've created a vector with the image but nothing is
displayed: http://jsfiddle.net/gilan/2CK25/

Can anybody help me with this issue?

Thanks in advance!

--
Josep Sanmartí Besora
Consorci de Biblioteques Universitàries de Catalunya - http://www.cbuc.cat/
Telf.: 93 567 98 07
Fax:  93 205 01 50
Correu: jsanmarti at cbuc.cat

El Consorci de Biblioteques Universitàries de Catalunya li agrairà que si ha
rebut aquest correu electrònic sense ser la persona a qui es volia destinar,
ens el reenviï i suprimeixi ambdós missatges i, si és el cas, els fitxers
que pogués portar com a annex. Qualsevol altre ús o acció podria ser
contrària a la llei. Gràcies.

_______________________________________________
Users mailing list
Users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/openlayers-users



More information about the Users mailing list