[OpenLayers-Dev] feature event in vector-2.4

Eric Lemoine Eric.Lemoine at camptocamp.com
Mon Mar 12 16:55:48 EDT 2007


On 3/12/07, Christopher Schmidt <crschmidt at metacarta.com> wrote:
> 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.

Yes, overriding onFeatureInsert() should meet my needs. Thanks,

-- 
Eric Lemoine

Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex

Tel : 00 33 4 79 44 44 96
Mail : eric.lemoine at camptocamp.com
http://www.camptocamp.com



More information about the Dev mailing list