Hi Robert (I re-send this attached to the list),

Since WMS layers (not features) contain raster data, OpenLayers can not (at
least on a simple way) know what features the mouse is over, because for OL
WMS layers are just images. You could send getFeatureInfo requests to your
WMS server and check if that request returns data for any valid feature, or
if you have that data served by a WFS you could ask that to it. But be
careful with the code because it's a kind of pooling (you should not send a
request for any movement you do with the mouse e.g. any pixel displacement,
that would lead to hundreds of requests).
Maybe a good alternative would be having a vector layer in the map
containing the features to check in the client side against that layer
wheather or not you are over any feature (you can hide it if you don't want
to show it). You should be careful anyway with the way you implement this,
there are not any remote requests but it can be very CPU intensive.
Hope this can help.
Best regards,

Xurxo Méndez Pérez

http://www.sonxurxo.com
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Reply via email to