[mapserver-users] WMSgetFeatureInfo and variable substitution

Steve.Toutant at inspq.qc.ca Steve.Toutant at inspq.qc.ca
Mon Nov 23 16:32:03 EST 2009


vendorParams works very well!
Thanks very much
Steve


 




bartvde at osgis.nl@lists.osgeo.org 
Envoyé par : mapserver-users-bounces at lists.osgeo.org
23/11/2009 01:56 PM

A
"Daniel Morissette" <dmorissette at mapgears.com>
cc
mapserver-users <mapserver-users at lists.osgeo.org>
Objet
Re: [mapserver-users] WMSgetFeatureInfo and variable substitution








Daniel is right.

Steve, I've opened up an OpenLayers bug [1]. In the meantime you can try
and use vendorParams on the GetFeatureInfo control, but you need to update
the property whenever your values change.

Further discussion can best be done on the OL mailing list.

[1] http://trac.openlayers.org/ticket/2358

Best regards,
Bart

> I saw your post on the openlayers list, and it seems from your
> description of the problem that the SEMCDC, RCC and ORDER params are
> included by OpenLayers in a GetMap request but it fails to include them
> in the corresponding GetFeatureInfo request. If that's the case then
> that's an issue with OpenLayers, or with the way you configure your
> queryable layer in OL. I'm not fluent enough in OL personally to tell
> where the solution lies, but if the params are missing in the URL then
> the problem is definitely on the client side and not on the server.
>
> Daniel
>
>
> Steve.Toutant at inspq.qc.ca wrote:
>>
>> Hi,
>> I already posted this problem on openlayers list, but it might be a
>> mapserver issue.
>>
>> OpenLayers.Control.WMSGetFeatureInfo doesn't use the FILTER key in my
>> mapfile. This filter is define with variables like this:
>> FILTER "semcdc in (%SEMCDC%) and rss in (%RSS%) and ordre in (%ORDRE%)"
>> .
>>
>> The getMap request is succesfull but not the GetFeatureInfo request
>>
>> Here is the request GetFeatureInfo
>> /cgi-bin/mapserv.exe?map=MYMAP
>> 
service=WMS&version=1.1.0&request=GetFeatureInfo&layers=ecoles&query_layers=ecoles&styles=&bbox=-8820221.560815%2C5721770.182129%2C-7587445.168853%2C6361395.234705&srs=EPSG%3A900913&feature_count=3000&x=272&y=457&height=523&width=1008&info_format=text%2Fhtml
>>
>>
>> Here is the response
>> <?xml version='1.0' encoding="ISO-8859-1" standalone="no" ?>
>> <!DOCTYPE ServiceExceptionReport SYSTEM
>> "http://schemas.opengis.net/wms/1.1.0/exception_1_1_0.dtd">
>> <ServiceExceptionReport version="1.1.0">
>> <ServiceException>
>> prepare_database(): Query error. Error declaring cursor: ERROR:  syntax
>> error at or near &quot;%&quot;
>> LINE 1: ...:text from ecoles WHERE (semcdc in (%SEMCDC%) ...
>>                                                             ^
>> With query string: DECLARE mycursor BINARY CURSOR FOR SELECT
>> 
&quot;taux_abs&quot;::text,&quot;nouv&quot;::text,asbinary(force_collection(force_2d(geom900913)),&#39;NDR&#39;),id::text
>> from ecoles WHERE (semcdc in (%SEMCDC%) and rss in (%RSS%) and ordre in
>> (%ORDRE%)) and (geom900913 &amp;&amp; setSRID(
>> &#39;BOX3D(-8493071.07981319 5795761.22549582,-8480841.15528974
>> 5807991.15001926)&#39;::BOX3D,900913) )
>>
>> </ServiceException>
>> </ServiceExceptionReport>
>>
>> In OL, I have a WMS layer define like this:
>> new OpenLayers.Layer.WMS('ecoles',
>> '.../cgi-bin/mapserv.exe?map=MYMAP',{layers: 'ecoles', transparent:
>> "true", format:"image/gif", SEMCDC:thisCDC, RSS: thisRSS, ORDRE:
>> thisOrdre},{isBaseLayer: false, visibility:
>> false,singleTile:true,transitionEffect: 'resize'});
>>
>> How should I query the layer?
>> Thanks
>> Steve
>> /
>> Steve Toutant, M. Sc./
>> Analyste en géomatique
>> Secteur environnement
>> Direction de la santé environnementale et de la toxicologie
>> Institut national de santé publique du Québec
>> 945, avenue Wolfe
>> Québec, Qc G1V 5B3
>>
>> Tél.: (418) 650-5115 #5281
>> Fax.: (418) 654-3144_
>> __steve.toutant at inspq.qc.ca_ <mailto:steve.toutant at inspq.qc.ca>_
>> __http://www.inspq.qc.ca_ <http://www.inspq.qc.ca/>
>>
>>
>> 
------------------------------------------------------------------------
>>
>> _______________________________________________
>> mapserver-users mailing list
>> mapserver-users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
>
> --
> Daniel Morissette
> http://www.mapgears.com/
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>


_______________________________________________
mapserver-users mailing list
mapserver-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20091123/2cbb8a24/attachment.html


More information about the mapserver-users mailing list