[OpenLayers-Users] associating events to geometries

Tim Schaub noreply at geocartic.com
Wed Mar 21 12:30:01 EDT 2007


Eric Lemoine wrote:
> ...
> 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.
> 

I just submitted a patch that gets rid of the old select handler and 
replaces it with a feature handler [1].  This feature handler supports 
callbacks for up, down, over, out, move, and double-click - 
corresponding to the associated mouse events on a feature.

This is the handler that will be used to build the remaining vector 
editing controls.  After the patch passes review, I'll commit it and 
continue putting together those controls.

It would be trivial to build a control that uses this handler to call 
whatever functions you choose on the events listed above.  In the patch, 
the modified SelectFeature control has a hover option to select a 
feature on mouseover and unselect it on mouseout.

As Chris has mentioned, some of the previous vector editing 
functionality will not make it into the 2.4 release.  My hope is that 
we'll have a solid architecture in 2.4 that will allow for greater 
flexibility in building that functionality in future releases.

When I find a bit more time, I'll also flesh out the handler 
documentation on the wiki.  I hope it will begin to make sense to others 
as a solid way to build controls in OpenLayers.

Tim

[1] http://trac.openlayers.org/ticket/544



More information about the Users mailing list