[OpenLayers-Users] Hover control sample (share)

Alexandre Dube adube at mapgears.com
Thu Jan 15 11:04:57 EST 2009


Hi list,

  I just want to share a sample of Handler.Hover usage I do.  The result 
is a Control.Hover I use to change the style of features hover the mouse 
without selecting them and display a popup at the same time.  You could 
also register events on "hoverfeatureset" and "hoverfeaturereset" to do 
more stuff if you want.

  See the example :
    
http://dev.openlayers.org/sandbox/adube/openlayers/examples/hover-control.html

  See the code :
    
http://dev.openlayers.org/sandbox/adube/openlayers/lib/OpenLayers/Control/Hover.js

  At first I wanted it to be a new OpenLayers feature, but then I 
thought that Handlers were created for the purpose of customizing our 
own controls depending of what our needs are.  So this Hover control is 
one of many possible usage of Handlers, so IMHO it's not useful to make 
it a new feature.  Sharing it is enough.

  Comments are welcomed,

-- 
Alexandre Dubé
Mapgears
www.mapgears.com




More information about the Users mailing list