PHP MapScript getWMSFeatureInfoURL()

Daniel Morissette dmorissette at MAPGEARS.COM
Thu Jan 4 15:50:05 EST 2007


This is legacy from the early days when the WMS connection type was 
fairly dumb and you needed to provide all the parameters in the 
CONNECTION string yourself. The new method is slightly smarter and 
allows you to set all the connection parameters (layer name, styles, 
etc.) via wms_* metadata entries and in this context this error messages 
doesn't make sense.

I had a quick look at the code and unfortunately the fix is not as 
simple as removing the error message. I'd suggest you file a bug about 
this and we should try to address it before 5.0. In the meantime you'll 
have to include QUERY_LAYERS in your URL.

Daniel


Armin Burger wrote:
> Hi all,
> 
> I have defined a WMS based layer in the map file:
> 
> CONNECTIONTYPE WMS
> CONNECTION "http://myserver/cgi-bin/mapserv?map=owstest.map&"
> 
> 
> When trying to use the PHP MapScript (MapServer 4.10) function 
> 'getWMSFeatureInfoURL()' for querying this layer, I get the error
> 
> msBuildWMSLayerURL(): WMS Connection String must contain the 
> QUERY_LAYERS parameter to support GetFeatureInfo requests (with name in 
> uppercase).
> 
> The function is only working correctly if I already put the 
> "QUERY_LAYERS=layer1,layer2" to the CONNECTION string of the WMS layer 
> definition in the map file. This is possible but looks a bit strange to 
> me. Is that an intended behaviour or a bug?
> 
> Best regards
> 
> Armin


-- 
Daniel Morissette
http://www.mapgears.com/



More information about the mapserver-users mailing list