[OpenLayers-Users] What Makes a Layer "queryable"? (ref:
WMSGetFeatureInfo())
Bill Thoen
bthoen at gisnet.com
Mon Sep 28 13:50:28 EDT 2009
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()? 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
More information about the Users
mailing list