[Users] Modify Feature

Alexandre Dube adube at mapgears.com
Fri Mar 4 14:41:23 CET 2011


Hi Vidal,

   "afterfeaturemodified" and "featuremodified" are 
OpenLayers.Layer.Vector events, so you need to do :

         vectorLayer.events.on({

             "afterfeaturemodified": handleMeasurement,

             "featuremodified": handleMeasurements

         });


Kind regards,


Alexandre


P.S. By the way, that question is "OpenLayers" related and should have 
been asked to the OpenLayers-Users ML.



On 11-03-04 08:04 AM, Vidal, Antoni wrote:
>
> Hi list,
>
> I'm trying to add a modify feature control. It works but when feature 
> has been modified, afterfeaturemodified event is not triggered and new 
> measure is not calculated, my code:
>
> var modifyOptions = {mode: OpenLayers.Control.ModifyFeature.RESHAPE | 
> OpenLayers.Control.ModifyFeature.DRAG | 
> OpenLayers.Control.ModifyFeature.ROTATE};
>
> var eventListeners = {"activate": this.controlActivated, scope:this};
>
>                 action = new GeoExt.Action({
>
>                                                control: new 
> OpenLayers.Control.ModifyFeature(vectorLayer, {eventListeners: 
> eventListeners}, modifyOptions),
>
>                                                tooltip: 'Modifica',
>
>                                                map: map,
>
>                                                iconCls: 'modifyfeature',
>
>                                                toggleGroup: 'tools'
>
>                 });
>
>         action.control.events.on({
>
>             "afterfeaturemodified": handleMeasurement,
>
>             "featuremodified": handleMeasurements
>
>         });
>
> actions.push(action);
>
> Any help would be appreciate,
>
> *Antoni Vidal*
>
> Unitat d'Aplicacions SIG-WEB
> Institut Cartogràfic de Catalunya 
> <http://mercuri.icc.cat/website/mob_nf/mob1/mob2/inici2.htm?CONSULTA=Institut%20Cartogr%25E0fic%20de%20Catalunya&XYADDRESS=429486:4580392>
> Parc de Montjuïc, E-08038 Barcelona
> Tel. (+34) 93 567 15 00 (ext. 3228)
> www.icc.cat <http://www.icc.cat/>
>
>
> _______________________________________________
> Users mailing list
> Users at geoext.org
> http://www.geoext.org/cgi-bin/mailman/listinfo/users


-- 
Alexandre Dubé
Mapgears
www.mapgears.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.geoext.org/pipermail/users/attachments/20110304/9889acc0/attachment.htm 


More information about the Users mailing list