[OpenLayers-Users] Control.WMSGetFeatureInfo problem

Steve.Toutant at inspq.qc.ca Steve.Toutant at inspq.qc.ca
Thu Sep 3 09:08:08 EDT 2009


Hello,
When I define the Control.WMSGetFeatureInfo if I don't specify the 
"layers:" properties, every visible layers with a Template in the mapfile 
are queried and I get the results. That is as expected. My problem is when 
I want to specify one layer to query. The request is not launched (I see 
nothing in firebug). Here is the code

test = new OpenLayers.Layer.WMS('HLM', 
'http://10.2.192.247/cgi-bin/mapserv.exe?map=/ms4w/paccSante/map/paccsante_chaleur.map&', 
{layers: 'HLM', transparent: "true", format:"image/gif"},{isBaseLayer: 
false, visibility: false,singleTile:true});
map.addLayer(test);

infoControls = 
{
click: new OpenLayers.Control.WMSGetFeatureInfo({
url: 
'http://10.2.192.247/cgi-bin/mapserv.exe?map=/ms4w/paccSante/map/paccsante_chaleur.map', 

title: 'Identify features by clicking',
layers: [test],
queryVisible: true,
infoFormat:'text/html'
})
}

for (var i in infoControls) 
{
        infoControls[i].events.register("getfeatureinfo", this, showInfo);
        map.addControl(infoControls[i]);
}
infoControls['click'].activate();

Is there any params missing?
Thanks for your help,
Steve
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090903/1f224d47/attachment.html


More information about the Users mailing list