[OpenLayers-Users] Drawing a polygon and retrieving it's geometric information

Ivan Grcic igrcic at gmail.com
Mon Feb 16 03:51:44 EST 2009


Hi,

double click closes polygon, and after that:

vlayer.onFeatureInsert=function(feat){alert(feat.geometry)};

Cheers,
Ivan

On Mon, Feb 16, 2009 at 12:17 AM, Bradley McLain
<bradley_mclain at debortoliwines.com> wrote:
> Hi all,
>
> What i would like to do is be able to draw a polygon on a map and then click
> a button and have the geometric co-ordinates of that polygon displayed.
>
> I have been using a vector layer in association with the DrawFeature
> control.
>
>  polygonEditor = new OpenLayers.Control.DrawFeature(vlayer,
> OpenLayers.Handler.Polygon);
> polygonEditor.activate();
>
> This draws the shape nicely however i have been unable to work out how to
> close this shape when done and then extract the information about it.
>
> Brad
>
>
> --
> Bradley Mclain
> Systems Administrator Trainee
> De Bortoli Wines Pty limited
> De Bortoli Rd, BILBUL NSW  2680
> e:  bradley_mclain at debortoliwines.com
>
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
>



-- 
Ivan Grcic



More information about the Users mailing list