feature event in vector-2.4

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

feature event in vector-2.4

erilem
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.

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

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

Tel : 00 33 4 79 44 44 96
Mail : [hidden email]
http://www.camptocamp.com
_______________________________________________
Dev mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: feature event in vector-2.4

Christopher Schmidt-2
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
_______________________________________________
Dev mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: feature event in vector-2.4

erilem
On 3/12/07, Christopher Schmidt <[hidden email]> 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 : [hidden email]
http://www.camptocamp.com
_______________________________________________
Dev mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/dev