[GIS] How to change mouse icon on hover a WMS layer feature using OpenLayers and GeoServer

geoserveropenlayers-2wms

My unfinished app is:

"http://190.5.81.197/MAPA_OL/mapa/matricula.html#"

I just want to know why I can't change mouse icon when the mouse is over a marker on a WMS layer. I am using GeoServer to create the WMS layer.

Best Answer

if you have extjs, you can do it with this way:

        info = new OpenLayers.Control.WMSGetFeatureInfo({
            url: 'http://demo.opengeo.org/geoserver/wms', 
            title: 'Identify features by hover',
            layers: [layer],
            hover: true,              
            formatOptions: {
                typeName: 'layer', 
                featureNS: 'http://www.openplans.org/topp'
            },
            queryVisible: true
        });

        map.addControl(info);
        info.activate();


        info.events.register("getfeatureinfo", this, showWaitCursor);

        function showWaitCursor(){
            Ext.util.CSS.updateRule('div.olMap', 'cursor', 'wait')
        };

i hope it helps you....