<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,"Ox")"><span class="q">inclination</span></span>, it just change their position.<br>
<br>The code is: <br><br> features[4].geometry.rotate(30,new OpenLayers.Geometry.Point(map.maxExtent.left + (4 * slot) + (slot / 2), 0));<br> features[4].layer.drawFeature(features[4]);<br> <br>
features[1].geometry.rotate(30,new OpenLayers.Geometry.Point(5,5));<br> 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"><<a href="mailto:crschmidt@metacarta.com">crschmidt@metacarta.com</a>></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>
> I'm making a map, and I need to create polygons on it that donīt change its<br>
> size when the zoom of the map change. I donīt use a mark because I need to<br>
> 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's a set of constants in OpenLayers.Renderer.symbol in<br>
OpenLayers.Renderer.Elements which you could extend.<br>
<div class="Ih2E3d"><br>
<br>
> I have another problem: I draw different layers with different units and<br>
> when it is draw the size of the figure is the same in spite of having<br>
> 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'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>