[OpenLayers-Users] How to Rotate an image

Arnd Wippermann arnd.wippermann at web.de
Thu Nov 14 13:39:01 PST 2013


Hi Josep,

I have forgotten, that you have to apply a context to the stylemap to
display the externalGraphic in map units.
Otherwise has the symbolizer used to display a point feature allways the
same size in every zoom level.

Example:
http://gis.ibbeck.de/ginfo/apps/OLExamples/OL212/externalGraphicRotation.asp
 
Regards,
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: Donnerstag, 14. November 2013 13:26
An: openlayers-users at lists.osgeo.org
Betreff: Re: [OpenLayers-Users] How to Rotate an image

Thanks Arnd,

It works! But since I've applied your solution I can't zoom in nor out the
image. Well, in fact it zooms but immediately it returns to the default
display

Here it is: http://jsfiddle.net/gilan/2CK25/


On 11/13/2013 06:16 PM, Arnd Wippermann wrote:
> 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
>

--
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