Thanks a lot Sveen, it works.

Best regards,

Vitor.

On Tue, Mar 2, 2010 at 10:32 AM, Sveen Atle Frenvik (Geomatikk IKT) <
[email protected]> wrote:

>  I guess you could use
>
> OpenLayers.​Geometry.​Polygon (
> http://dev.openlayers.org/releases/OpenLayers-2.8/doc/apidocs/files/OpenLayers/Geometry/Polygon-js.html),
> but the doc says it is constructed from an array of
> OpenLayers.​Geometry.​LinearRings, so I guess the safe bet is to use:
>
> 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]);
>
>
> and then create a feature from the geometry using
> OpenLayers.​Feature.​Vector
>
>
> -atle
>
>
>
> On 03/02/2010 01:48 PM, Vitor Isaia wrote:
>
> Dear list,
>
> I need OpenLayers to draw automatically irregular polygons, from sets of
> coordinates, that represent geofences.
>
> I already have, in my application, regular polygons (circles) drawn from
> coordinates, but I can't find a way to draw irregular ones, like this:
>
> [image: polygons.jpg]
>
> http://img195.imageshack.us/img195/6235/polygons.jpg
>
> Any clue about how to do that?
>
> Thanks in advance.
>
> Vitor Isaia - Brazil
>
>
> _______________________________________________
> Users mailing 
> [email protected]http://openlayers.org/mailman/listinfo/users
>
>
>
> --
> Atle Frenvik Sveen
> GIS Konsulent
> Geomatikk IKT AS
> tlf: 45 27 86 [email protected]
>
>
> _______________________________________________
> Users mailing list
> [email protected]
> http://openlayers.org/mailman/listinfo/users
>
>
_______________________________________________
Users mailing list
[email protected]
http://openlayers.org/mailman/listinfo/users

Reply via email to