I am using QGIS Server that is running in my OSGeo Apache web server (on 
Windows 7).  Not sure what version the QGIS Server is but it was from the 
latest OSGeo4W installer.  I was testing an OpenLayers client to view a QGIS 
Desktop project file over WMS from the QGIS Server.  All seems good with that.  
For example, my OpenLayers code to get  this looks like:

var url = "http://localhost:8090/qgis/qgis_mapserv.fcgi.exe";;
var layer = new OpenLayers.Layer.WMS( "Main Layer", url, {
        layers: 'table_poly,location_view',
        format: 'image/png',
   },
   {
       buffer: 1, 
        isBaseLayer: true, 
       graphicZIndex: 0, 
   }
);
map.addLayers([layer]);

With the above, I can view my layers within OpenLayers.  My next test was to 
see if I could get the feature info from items on my layers.  I found an 
example of how to make this call in OpenLayers and it looks like:

var info = new OpenLayers.Control.WMSGetFeatureInfo({
                          url: url,
                          title: 'Identify features by clicking',
                          queryVisible: true,
                          eventListeners: {
                            getfeatureinfo: function(event) {
                                alert("Got feature info");                      
   
                            }
                         }
                      });
map.addControl(info);
info.activate();

When I tried this, I didn't get anything except a spinning cursor.  I then 
tried another test to see if that was the correct way to ask for feature info 
so I changed the URL for the layers to get the layers from my GeoServer rather 
than from QGIS Server (the project file got these layers initially from 
GeoServer so we are talking about the same layer source).  That worked just 
fine and I was able to get individual feature information.  After switching 
back to point to my QGIS Server I started to look at the Apache web server logs 
and the GeoServer output screen.  The Apache logs didn't list anything related 
but the GeoServer console listed the following:

20 Jan 13:06:57 INFO [geoserver.wms] -
Request: getServiceInfo
20 Jan 13:06:57 INFO [geoserver.wms] -
Request: getCapabilities
        Namespace = Postgres
        UpdateSequence = null
        Request = GetCapabilities
        Version = 1.3.0
        RequestCharset = null
        RawKvp = {SERVICE=WMS, REQUEST=GetCapabilities}
        Get = false
        BaseUrl = http://localhost:8080/geoserver/
20 Jan 13:06:57 WARN [wms.capabilities] - Map output format text/html does not i
nclude mime type in output format names. Will be excluded from capabilities docu
ment.
20 Jan 13:06:57 WARN [wms.capabilities] - Map output format application/xml does
 not include mime type in output format names. Will be excluded from capabilitie
s document.

This occurred just after clicking on my OpenLayers map, which in turn triggered 
the WMSGetFeatureInfo request.  I noticed that there was no reference to 
GetFeatureInfo.  So... I am not sure what to make of this.  Should my 
OpenLayers call be something different?  Does QGIS Server not serve up features 
from layers within a project file?  I had found some references concerning a 
problem with QGIS Server and GetFeatureInfo calls (Bug #8656) but the request 
URL listed seemed to be something different than my scenario via OpenLayers and 
to a project file layer.  

Any thoughts? 

Thanks - Peter
_______________________________________________
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user

Reply via email to