[OpenLayers-Users] Refresh WMS Select Control
Shadin
shadin__a at hotmail.com
Mon May 6 04:49:10 PDT 2013
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(
"test",
"http://IP/geoserver/wms",
{
layers: "test:testLayer" ,
transparent: "true",
format: "image/png",
sld_body: sld
},{visibility: true},
{isBaseLayer: false}
);
Layer.addOptions({id:'Layer'});
map.addLayer(Layer);
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
});
map.addControl(selectControl);
selectControl.activate();
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Refresh-WMS-Select-Control-tp5051571.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
More information about the Users
mailing list