[OpenLayers-Users] howto regist. featuremodified instead onModification ?

Alexandre Dube adube at mapgears.com
Fri Dec 12 13:17:53 EST 2008


Hi,

  The onModification function of ModifyControl is deprecated.  How do 
you register a featuremodified instead ?

  I've tried this but oFeature is the layer object instead of a feature :


layer.events.register("featuremodified",'', onRoadModification);

function onRoadModification(oFeature) {
    OpenLayers.Console.log("modified", oFeature.id);
};


I tried ("featuremodified",this.feature, onRoadModification), not 
working either.

this could work, but I'm not sure it's the good way to do it.
function onRoadModification(object) {
    oFeature = object.feature;
    OpenLayers.Console.log("modified", oFeature.id);
};

The old onModification was called with (object.feature), so I suppose 
the above solution is the good way, but I just want to be sure.

Any hint ?

-- 
Alexandre Dubé
Mapgears
www.mapgears.com




More information about the Users mailing list