[OpenLayers-Users] Marker events register "hover"?

bishop bishop at ideacode.com
Sun Sep 11 14:56:26 EDT 2011


jhpoosthoek wrote:
> 
> Is it possible to change the mouse cursor into a pointer when you
> 'mouseover' a marker? In CSS this would be cursor: "pointer". But I don't
> know how to add that to the marker object.
> 

OpenLayers (as of version 2.10) doesn't class icon markers, but their id do
always end in "_innerImage".  So, use the CSS attribute selector "splat" to
style markers:

img[id *= "_innerImage"]:hover { cursor:pointer; }

Should work in FF, Chrome, Safari, Opera, and IE7+.  Screen shot attached
shows what it looks like in Firebug.
http://osgeo-org.1803224.n2.nabble.com/file/n6781478/marker-icon-cursor-pointer.png 

--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/Marker-events-register-hover-tp4436306p6781478.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.


More information about the Users mailing list