[OpenLayers-Users] Hover control sample (share)

Alexandre Dube adube at mapgears.com
Mon Jan 19 08:43:19 EST 2009


Hi list,

  I changed the name of this control for HighlightFeature ( thanks to 
Yves ).  See the changes below :

Alexandre Dube wrote:
> 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
>   

http://dev.openlayers.org/sandbox/adube/openlayers/examples/highlight-feature.html

See an other example of this control with the OptionByZoom strategy :
http://dev4.mapgears.com/bdga/options-by-zoom-and-highlight-bdga.html

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

http://dev.openlayers.org/sandbox/adube/openlayers/lib/OpenLayers/Control/HighlightFeature.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