<div dir="ltr">Hi!<br><br>I&#39;m trying to rotate the symbols around their own center but I canīt; they rotate around another point, In my opinion, the only choice is extend OpenLayers.Renderer.symbol &nbsp;in OpenLayers.Renderer.Elements, to define a element for each angle that I need, from 0 up to 360 degrees.<br>
<br>Another possibility is to create polygons but they change their size with the changes of the zoom of the map and I donīt want this, I need that their size constant.<br><br>Has someone any idea of how I can do this?<br>
<br>Thank you for your help!!<br><br>&nbsp;Regards!!!<br><br><br><div class="gmail_quote">2008/8/4 Jose A. C. <span dir="ltr">&lt;<a href="mailto:joscalv@gmail.com">joscalv@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div dir="ltr">Hi!<br><br>This solution is perfect, but I need to rotate the polygons around their own center, since the rotate function doesnīt change their <span><span>inclination</span></span>, it just change their position.<br>

<br>The code is: <br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; features[4].geometry.rotate(30,new OpenLayers.Geometry.Point(map.maxExtent.left + (4 * slot) + (slot / 2), 0));<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; features[4].layer.drawFeature(features[4]);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; features[1].geometry.rotate(30,new OpenLayers.Geometry.Point(5,5));<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; features[1].layer.drawFeature(features[1]);<br><br>where features array comes from the example <a href="http://openlayers.org/dev/examples/graphic-name.html" target="_blank">http://openlayers.org/dev/examples/graphic-name.html</a>.<br>

<br>Thanks!!!<br><br><div class="gmail_quote">2008/8/1 Christopher Schmidt <span dir="ltr">&lt;<a href="mailto:crschmidt@metacarta.com" target="_blank">crschmidt@metacarta.com</a>&gt;</span><div><div></div><div class="Wj3C7c">
<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>On Fri, Aug 01, 2008 at 08:39:54AM +0200, Jose A. C. wrote:<br>
&gt; I&#39;m making a map, and I need to create polygons on it that donīt change its<br>
&gt; size when the zoom of the map change. I donīt use a mark because I need to<br>
&gt; rotate it.<br>
<br>
</div>Sounds like you want this:<br>
<br>
<a href="http://openlayers.org/dev/examples/graphic-name.html" target="_blank">http://openlayers.org/dev/examples/graphic-name.html</a><br>
<br>
There&#39;s a set of constants in OpenLayers.Renderer.symbol &nbsp;in<br>
OpenLayers.Renderer.Elements which you could extend.<br>
<div><br>
<br>
&gt; I have another problem: &nbsp;I draw different layers with different units and<br>
&gt; when it is draw the size of the figure is the same in spite of &nbsp;having<br>
&gt; different measures unit (Km and inches). The code is:<br>
<br>
</div>The units of the layer have no control over anything. Your units you are<br>
providing are *map* units -- and the *name* you give to those units is<br>
irrelevant. What you want to do is change the size of the units. If you<br>
want to create something that&#39;s a different size, you need to provide<br>
the correct size in current map units. (Your map is probably in<br>
degrees.)<br>
<br>
Regards,<br>
<font color="#888888">--<br>
Christopher Schmidt<br>
MetaCarta<br>
</font></blockquote></div></div></div><br></div>
</blockquote></div><br></div>