[OpenLayers-Users] What Makes a Layer "queryable"? (ref: WMSGetFeatureInfo())

Christopher Schmidt crschmidt at metacarta.com
Mon Sep 28 14:37:36 EDT 2009


On Mon, Sep 28, 2009 at 11:50:28AM -0600, Bill Thoen wrote:
> Using OL over MapServer, if you pass a list of layers to 
> WMSGetFeatureInfo() where one of them is not queryable, you get no 
> results even for the ones that are queryable. What I'm wondering is what 
> do I test in a layer to make sure it's queryable before I pass it to 
> WMSGetFeatureInfo()? 

Load the WMS GetCapabilties. They have a flag for 'queryable' in them.

-- Chris

> For example, if you forget to specify a template 
> reference in your mapfile, then the layer cannot be queryed. I think it 
> also must have metadata specified --wms_title and wms_srs, at least. And 
> if you want to see the attributes you also need to specify the metadata 
> element gml_include_items and set DUMP to TRUE. But I don't have 
> mapscript working yet and I can't get into the mapfile from OpenLayers 
> using JavaScript.
> 
> Or do you have to do something like test each layer at its centroid with 
> WMSGetFeatureInfo() to see if it returns results from that layer and  
> adjust what you're passing into OL accordingly? Or is there another, 
> less kludgy approach that I've missed?
> 
> Thanks,
> - Bill Thoen
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users

-- 
Christopher Schmidt
MetaCarta



More information about the Users mailing list