I have been playing with the QGIS Server and looking at how it serves up QGIS 
Desktop project files using WMS.  My initial tests were to create a new WMS 
layer in QGIS Desktop which used a URL to serve up a project file.  When I did 
this, QGIS Desktop listed all of the layers within the project file to choose 
from.  I could pick and choose which ones to add to the new project file.  I 
also found that when I selected a feature layer (feature points from our 
database), the Identify Features tool showed the selected feature metadata 
which meant that although the layer was served up over WMS, it still understood 
it to be a feature layer.  The next step was to try to load the project file in 
OpenLayers (using an OpenLayers.Layer.WMS object).  When trying this, I found 
the following:

1) I needed to list the WMS layer as an image
2) I could give the file path to the project file using the "map" option
3) I had to list the name of the layer.  When I used a GetCapabilities URL in 
the browser for a given project file, I see that there is always a Layer with 
the name of the project file and SOMETIMES there is another layer name for one 
of the actual layers within the project.  I have yet to see a GetCapabilities 
for a project file that listed all the layer names.  In any case, if I used the 
project file name as the layer name option, it would indeed display everything 
on the OpenLayers map.

I guess as expected, because the layer was displayed as an image and as a 
single layer, there was no access to the feature metadata (like there is with 
the Feature Identify tool in QGIS Desktop).  The layer was simply a WMS image.  
Based on this, my conclusion is that there is no way to select and view 
individual features from my QGIS project file when the client is a 
browser-based mapping API like OpenLayers.  Does this sound about right, or am 
I missing some other way to have OpenLayers understand that there are actual 
features, like points, lines, and polygons?

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

Reply via email to