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:
        
         polygons.jpg<http://img195.imageshack.us/img195/6235/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 list
        [email protected]
        http://openlayers.org/mailman/listinfo/users
          



-- 
Atle Frenvik Sveen
GIS Konsulent
Geomatikk IKT AS
tlf: 45 27 86 89
[email protected]
_______________________________________________
Users mailing list
[email protected]
http://openlayers.org/mailman/listinfo/users

Reply via email to