Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I use WMS layer in my application and I need to refresh it with new parameters.

I did refresh the WMS layer correctly but I couldn't find a way to refresh its select control. So I got the new layer but cannot click on any point to display its info. Here is a piece of my code:

Layer =new OpenLayers.Layer.WMS(

                layers: "test:testLayer" ,       
                transparent: "true",
                format: "image/png",
                sld_body: sld
            },{visibility: true},
            {isBaseLayer: false}
Layer.mergeNewParams( { viewparams: 'UID:2' });

 var selectControl = new OpenLayers.Control.GetFeature({
        protocol: OpenLayers.Protocol.WFS.fromWMSLayer(Layer, {
           url: "http://IP/geoserver/wfs",
          featureType: "testLayer"
        hover: true
share|improve this question
add comment

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.