Thanks a lot Sveen, it works.<br><br>Best regards,<br><br>Vitor.<br><br><div class="gmail_quote">On Tue, Mar 2, 2010 at 10:32 AM, Sveen Atle Frenvik (Geomatikk IKT) <span dir="ltr">&lt;<a href="mailto:Atle.Frenvik.Sveen@geomatikk.no">Atle.Frenvik.Sveen@geomatikk.no</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">


  

<div text="#000000" bgcolor="#ffffff">
I guess you could use <br>
<br>
OpenLayers.​Geometry.​Polygon
(<a href="http://dev.openlayers.org/releases/OpenLayers-2.8/doc/apidocs/files/OpenLayers/Geometry/Polygon-js.html" target="_blank">http://dev.openlayers.org/releases/OpenLayers-2.8/doc/apidocs/files/OpenLayers/Geometry/Polygon-js.html</a>),
but the doc says it is constructed from an array of
OpenLayers.​Geometry.​LinearRings, so I guess the safe bet is to use:<br>
<br>
var poly = new
OpenLayers.​Geometry.​Polygon([OpenLayers.​Geometry.​
LinearRing([OpenLayers.​Geometry.​Point(lon1,lat1),OpenLayers.​Geometry.
​Point(lon2,lat2),OpenLayers.​Geometry.​Point(lon3,lat3)]),etc]);<br>
<br>
<br>
and then create a feature from the geometry using
OpenLayers.​Feature.​Vector<br>
<br>
<br>
-atle<div><div></div><div class="h5"><br>
<br>
<br>
On 03/02/2010 01:48 PM, Vitor Isaia wrote:
</div></div><blockquote type="cite"><div><div></div><div class="h5">Dear list,<br>
  <br>
I need OpenLayers to draw automatically irregular polygons, from sets
of coordinates, that represent geofences.<br>
  <br>
I already have, in my application, regular polygons (circles) drawn
from coordinates, but I can&#39;t find a way to draw irregular ones, like
this:<br>
  <br>
  <img src="" title="polygons.jpg" alt="polygons.jpg"><br>
  <br>
  <a href="http://img195.imageshack.us/img195/6235/polygons.jpg" target="_blank">http://img195.imageshack.us/img195/6235/polygons.jpg</a><br>
  <br>
Any clue about how to do that?<br>
  <br>
Thanks in advance.<br>
  <br>
Vitor Isaia - Brazil<br>
  </div></div><pre><fieldset></fieldset>
_______________________________________________
Users mailing list
<a href="mailto:Users@openlayers.org" target="_blank">Users@openlayers.org</a>
<a href="http://openlayers.org/mailman/listinfo/users" target="_blank">http://openlayers.org/mailman/listinfo/users</a>
  </pre>
</blockquote>
<br><font color="#888888">
<br>
<pre cols="72">-- 
Atle Frenvik Sveen
GIS Konsulent
Geomatikk IKT AS
tlf: 45 27 86 89
<a href="mailto:atle.frenvik.sveen@geomatikk.no" target="_blank">atle.frenvik.sveen@geomatikk.no</a></pre>
</font></div>

<br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@openlayers.org">Users@openlayers.org</a><br>
<a href="http://openlayers.org/mailman/listinfo/users" target="_blank">http://openlayers.org/mailman/listinfo/users</a><br>
<br></blockquote></div><br>