[OpenLayers-Users] wfs stylemap example?

Arnd Wippermann arnd.wippermann at web.de
Thu Jul 31 16:44:51 EDT 2008


Instead of "select" try "crosshair". 

I init my cursor for select with
OpenLayers.Feature.Vector.style['select']['cursor'] = 'crosshair';, but it
doesn't work. But when i select and then unselect a feature, then the cursor
will change, when I hover over the feature.

Perhaps it is bug. When I look in my application at the generated svg in
firebug, there is no attribute "cursor". But after a select the attribute is
added.

Arnd Wippermann


-----Ursprüngliche Nachricht-----
Von: adube at mapgears.com [mailto:adube at mapgears.com] 
Gesendet: Donnerstag, 31. Juli 2008 15:44
An: Christopher Schmidt
Cc: Arnd Wippermann; users at openlayers.org
Betreff: Re: [OpenLayers-Users] wfs stylemap example?

Christopher Schmidt wrote:
>
> Alternatively, set your strokeWidth to a larger number (I always use 3).
>   
Wow !  Haven't though about that but it's a simple and clever solution
:)  Thanks.
> You can't change the color when hovering, but you can change the cursor:
> set OpenLaeyrs.Feature.Vector['default'].cursor = "select"; and it 
> will change the cursor when it is over a feature.
>
>   
I think it's more like : 
OpenLayers.Feature.Vector.style['default'].cursor = "select";  but it's not
working.  The value "" of the cursor IS changed to "select", but that does
nothing when my mouse is over a feature.

In OpenLayers.Features, I have Vector and WFS.  I assumed that because my
layer is WFS I had to change my cursor there but it has no style.

Any ideas ?
> No real way to do that with the current code. Specifically, the reason 
> is becasue the event is determined based on the browser saying "Here 
> is the element that was under the mouse when the event triggered." But 
> making the feature bigger will help.
>
>   
I will try to think of something.

--
Alexandre Dubé
Mapgears
www.mapgears.com




More information about the Users mailing list