[mapserver-users] Variable-substitution cause WMS GetFeatureInfo error

AlessioDL alessio.dilorenzo at gmail.com
Thu Aug 27 05:21:21 EDT 2009




Stephan Holl wrote:
> 
> 
> I cannot see the Variable year passing to the getfeatureInfo-Request.
> 
> You should verify if the getfeatureinfo-request ist built correct by
> openlayers. Using a handcraftet getfeatureinfo-request with the
> filter-attribute should work.
> 
> 

Hi Stephan. Using firebug I noticed that the GFI request built by OpenLayers
is:

http://correggiov3/cgi-bin/mapserv.exe?map=/ms4w/apps/caps_manager/Mapfiles/wms.map&service=WMS&version=1.1.0&request=GetFeatureInfo&layers=QueryAreas&query_layers=QueryAreas&styles=&bbox=1486547.325892%2C5335610.321683%2C1926824.608736%2C5681105.68947&srs=EPSG%3A900913&feature_count=10&x=377&y=368&height=565&width=720&info_format=text%2Fhtml

so, there are no references to the year variable.

By adding vendorParams: {"year":year} to the GetFeatureInfo control options
the request changes and include the parameter:
http://correggiov3/cgi-bin/mapserv.exe?map=/ms4w/apps/caps_manager/Mapfiles/wms.map&service=WMS&version=1.1.0&request=GetFeatureInfo&layers=QueryAreas&query_layers=QueryAreas&styles=&bbox=1340399.72784%2C5118834.909503%2C2220954.293527%2C5809825.645077&srs=EPSG%3A900913&feature_count=10&x=308&y=290&height=565&width=720&info_format=text%2Fhtml&year=2009

but the error is still the same. 
It looks like the mapfile results wrong when I put inside it the %year%
variable.

-- 
View this message in context: http://n2.nabble.com/Variable-substitution-cause-WMS-GetFeatureInfo-error-tp3515191p3523156.html
Sent from the Mapserver - User mailing list archive at Nabble.com.


More information about the mapserver-users mailing list