[OpenLayers-Users] WMS server error. Requested layer(s) are not queryable.

P Kishor punk.kish at gmail.com
Fri Sep 18 22:38:33 EDT 2009


On Fri, Sep 18, 2009 at 9:12 PM, P Kishor <punk.kish at gmail.com> wrote:
> On Fri, Sep 18, 2009 at 6:51 PM, Christopher Schmidt
> <crschmidt at metacarta.com> wrote:
>> On Fri, Sep 18, 2009 at 04:11:30PM -0500, P Kishor wrote:
>>> Inspired by a recent post, I decided to implement WMSGetFeatureInfo
>>> using the code in the OL examples. However, I am getting the following
>>> error
>>>
>>> <ServiceException code="LayerNotQueryable">
>>> msWMSFeatureInfo(): WMS server error. Requested layer(s) are not queryable.
>>> </ServiceException>
>>>
>>> My backend server is MapServer, and per another archived email, I have
>>> my LAYER definition in the mapfile tagged with DUMP true
>>>
>>>     LAYER
>>>         NAME 'cds_stands'
>>>         TYPE polygon
>>>
>>>         CONNECTIONTYPE postgis
>>>         CONNECTION "..."
>>>         DATA 'the_geom FROM cds_stands'
>>>
>>>         STATUS on
>>>         DUMP true
>>
>> You don't have a 'template' in that layer paste. Is there one configured
>> on the layer?
>
>
> I do not have a template for that layer. I did not realize it was
> needed, somehow thinking that a default field: value template was
> "cooked" up by OL's ajax code. I will make one and try again (although
> I am not even sure what to put in that template). That said, my
> MapServer is reporting that the layer is not queryable, as shown
> above. Is that because there is no template, or is that because, for
> whatever reason, the layer is not queryable?
>
> A GetCapabilities query reveals the same info...
>
>    <Layer queryable="0" opaque="0" cascaded="0">
>        <Name>cds_stands</Name>
>        <Title>cds_stands</Title>
>        <SRS>EPSG:4326 EPSG:3071 EPSG:900913</SRS>
>        <LatLonBoundingBox minx="-180" miny="-1.10493e+13"
> maxx="177.111" maxy="1.04158e+23" />
>        <BoundingBox SRS="EPSG:3071"
>                    minx="-2.5e+07" miny="-2.5e+07" maxx="2.5e+07"
> maxy="2.5e+07" />
>        <Style>
>          <Name>default</Name>
>          <Title>default</Title>
>          <LegendURL width="140" height="329">
>             <Format>image/png</Format>
>             <OnlineResource
> xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple"
> xlink:href="http://localhost/cgi-bin/mapserv?map=/Users/punkish/Data/cnnf/cnnf.map&amp;version=1.1.0&amp;service=WMS&amp;request=GetLegendGraphic&amp;layer=cds_stands&amp;format=image/png&amp;STYLE=default"/>
>          </LegendURL>
>        </Style>
>        <ScaleHint min="11.9736683623113" max="249.451424214819" />
>    </Layer>
>
> Anyway, I will deploy a template and try again.
>
>



Ok. I went from

<Layer queryable="0" opaque="0" cascaded="0">

to

<Layer queryable="1" opaque="0" cascaded="0">

when I supplied a simple template with "[VEGETATION]" (that's the name
of the column in my Pg table.

MapServer is now croaking with

<ServiceException>
msWMSFeatureInfo(): WMS server error. Unsupported INFO_FORMAT value (text/html).
</ServiceException>




>>
>>>         ..
>>>
>>> Once I solve the above, I have a follow-up question -- the examples of
>>> WMSGetFeatureInfo I have seen in the wild either don't specify any
>>> layers at all (which, I believe, implies that all layers will be
>>> queried at the point of click) or specify a layer in the code via
>>>
>>> layers: [layer1 layer2 ...],
>>>
>>>
>>> How would I build a widget that allows the user choose which layer to query?
>>>
>>>
>>> --
>>> Puneet Kishor
>>> _______________________________________________
>>> Users mailing list
>>> Users at openlayers.org
>>> http://openlayers.org/mailman/listinfo/users
>>
>> --
>> Christopher Schmidt
>> MetaCarta
>>
>
>
>



-- 
Puneet Kishor http://www.punkish.org
Carbon Model http://carbonmodel.org
Charter Member, Open Source Geospatial Foundation http://www.osgeo.org
Science Commons Fellow, http://sciencecommons.org/about/whoweare/kishor
Nelson Institute, UW-Madison http://www.nelson.wisc.edu
-----------------------------------------------------------------------
Assertions are politics; backing up assertions with evidence is science
=======================================================================
Sent from Madison, WI, United States



More information about the Users mailing list