<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 style="cursor: pointer;" onclick="dr4sdgryt(event,&quot;Ox&quot;)"><span class="q">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">crschmidt@metacarta.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 class="Ih2E3d">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 class="Ih2E3d"><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><br></div>