[OpenLayers-Users] associating events to geometries

Eric Lemoine Eric.Lemoine at camptocamp.com
Mon Mar 19 11:21:27 EDT 2007


On 3/19/07, Eric Lemoine <Eric.Lemoine at camptocamp.com> wrote:
> On 3/19/07, Christopher Schmidt <crschmidt at metacarta.com> wrote:
> > On Mon, Mar 19, 2007 at 11:40:22AM +0100, Eric Lemoine wrote:
> > > Hello
> > >
> > > I'd like to associate events to geometries. With the old vector branch
> > > I did that using
> > >
> > > feature.geometry.registerEventCallback('mouseover', null, callback);
> > >
> > > but the registerEventCallback() no longer exists in the new vector tree.
> >
> > Have a look at http://openlayers.org/dev/examples/openmnnd.html , and
> > the SelectFeature control. (In this case, the 'move' callback).
>
> Good. Now I also need to handle 'mouseout' events, and I cannot find
> an appropriate callback for mouseout...

I just figured that using the SelectFeature control with the 'move'
callback isn't the same as using registerEventCallback() with
'mouseover' as I used to do. Indeed, when using SelectFeature with
'move' the callback is called each time the mouse pointer starts
moving on the feature. I don't want that. I want an event on
'mouseover' and another one on 'mouseout', not tons of events if the
mouse pointer moves on the feature.


-- 
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 Users mailing list