[OpenLayers-Users] Accessing the events of DrawFeature and ModifyFeature to calculate area

Christoph Ratke christoph.ratke at gmx.net
Thu Feb 18 13:05:24 EST 2010


Hi Mr. Ang,

you can have a look here:
http://dev.openlayers.org/releases/OpenLayers-2.8/examples/modify-feature.html
or here:
http://dev.openlayers.org/releases/OpenLayers-2.8/examples/highlight-feature.html

Have a good day,
Christoph


Albert Ang schrieb:
> Dear all,
>  
> I need assistance in using the events of DrawFeature and 
> ModifyFeature. Can anyone provide some examples? I use the DrawFeature 
> and ModifyFeature as following but need guidance on how to use the 
> events of DrawFeature (featureadded) and ModifyFeatures 
> (featuremodified). Basically I like to use the 
> feature.geometry.getGeodesicArea() function to calculate area 
> dynamically when an user draws a polygon or when he modifies the polygon.
>  
> controls = {
>                 dpolygon: new OpenLayers.Control.DrawFeature(aoi,
>                             OpenLayers.Handler.Polygon, drawOptions),
>                 modify: new OpenLayers.Control.ModifyFeature(aoi,
>                                                              
> modifyOptions),
>               selectVector: new OpenLayers.Control.SelectFeature(aoi, 
> wktOptions)
> }
>  
> Thank you in advance.
>  
> Albert
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>   




More information about the Users mailing list