[OpenLayers-Dev] feature event in vector-2.4

Christopher Schmidt crschmidt at metacarta.com
Mon Mar 12 16:50:09 EDT 2007


On Mon, Mar 12, 2007 at 09:12:12PM +0100, Eric Lemoine wrote:
> Hello
> 
> I have an application based on previous vector branch that I'm
> planning on migrating to 2.4.
> 
> In that app I do map.events.register("unknownfeature", null, callback)
> to be notified when a feature is added to a vector layer. Being able
> to be notified on feature insert is important since most of the time
> features are requested asynchronously.

In order to have different callbacks for different layers, this was
changed to an 'onFeatureInsert' method on the layer. You can see this in
action on the openmnnd.html demo in the examples/ directory, changing
the styles after the features are added, or in the wfs-scribble.html
demo, which sets the state to "INSERT". 

> Looking at current vector-2.4 there's no event triggered on feature
> insertion. Would a patch that does this be accepted?

I'd need to hear a reason why onFeatureInsert() doesn't cover your need
first. 

Regards,
-- 
Christopher Schmidt
MetaCarta



More information about the Dev mailing list