Hi,

I am trying to work with a WMSGetFeatureInfo example for one of my project. My MapServer (local one) supports WMS too. 

I am able to view the Map that consists of different WMS layers, able to add the LayerSwitcher control and can use it.

I have added a WMSGetFeatureInfo control in the map but clicking (single) does not issue any requests or rather it does nothing.

* At the moment I dont have any meaninful template file for querying the layer(s) the map file contains an tmp name in place of Template, is this issue due to that?

I have furnished my code below.

Plz help me with this issue.

<h3>Source Code</h3>

&lt;html&gt;
    &lt;head&gt;
        <title>MapServer GetFeatureInfo</title>
        &lt;link rel=&quot;stylesheet&quot; href=&quot;OL-2.10/theme/default/style.css&quot; type=&quot;text/css&quot; /&gt;
        &lt;style type=&quot;text/css&quot;&gt;
            .w {
                width: 500px;
                height: 400px;
            }
        &lt;/style&gt;
        &lt;script src=&quot;OL-2.10/lib/OpenLayers.js&quot;&gt;
        &lt;/script&gt;
        &lt;script&gt;
            
            /*Proxy does not need as I am dealing with the same server*/
            //OpenLayers.ProxyHost = &quot;OL-2.10/examples/proxy.cgi?url=&quot;;
            
            var map, l = ['ortofoto2009', 'centraline_new', 'cn156', 'cn5', 'cn171'], 
                                layers = [], infoControl = null, 
                                mpTmp = null, 
                                fmt1 = 'image/gif', 
                                fmt2 = 'image/png', 
                                baseLayerFlag = false;
            
            window.onload = function(){
            
                var bnds = new OpenLayers.Bounds(663000, 5102000, 665000, 5103000), 
                                        ms = 'http://localhost:8080/cgi-bin/mapserv.exe', 
                                        mpf = 'C:/ms4w/apps/FarSystems.map', 
                                        mp = ms + '?map=' + mpf; //I am using it together for now will change later
                                        
                map = new OpenLayers.Map('map', {
                    maxExtent: bnds
                });
                
                for (var i = 0; i &lt; l.length; i++) {
                                        //First layer will act as base layer
                                        //console.log(i === 0)
                    baseLayerFlag = i === 0 ? true : false;
                    console.log(baseLayerFlag)
                                        //Layer object Initialization
                    layers.push(new OpenLayers.Layer.WMS(l[i], mp, {
                        layers: l[i],
                        buffer: 4,
                        transparent: 'true',
                        format: fmt1
                    }, {
                        isBaseLayer: baseLayerFlag, 
                                                visibility: true
                    }));                                        
                }
                
                map.addLayers(layers);
                
                map.addControl(new OpenLayers.Control.LayerSwitcher());
                
                //Intializing WMSGetFeatureInfo control
                infoControl = new OpenLayers.Control.WMSGetFeatureInfo({
                    url: mp,
                    title: 'WMS Test',
                    layers: l,
                    infoFormat: 'text/html',
                    queryVisible: true,
                    id: 'gfi',
                    maxFeatures: 2,
                    eventListeners: {
                        getfeatureinfo: function(e){
                            console.log(e);
                        }
                    }
                });
                
                map.addControl(infoControl);
                infoControl.activate();
                map.zoomToExtent(bnds, true);                                
            };
        &lt;/script&gt;
    &lt;/head&gt;
    &lt;body&gt;
        <div id="map" class="w">
        </div>
    &lt;/body&gt;
&lt;/html&gt;
        
<br/><hr align="left" width="300" />
View this message in context: <a href="http://osgeo-org.1803224.n2.nabble.com/WMSGetFeatureInfo-control-is-not-firing-tp6085160p6085160.html">WMSGetFeatureInfo control is not firing</a><br/>
Sent from the <a href="http://osgeo-org.1803224.n2.nabble.com/OpenLayers-Users-f1822463.html">OpenLayers Users mailing list archive</a> at Nabble.com.<br/>