[Mapserver-users] getFeatureInfo on dynamic layer -emptyexception

Daniel Morissette morissette at dmsolutions.ca
Tue Nov 4 21:03:04 EST 2003


Frieso ter Haseborg wrote:
> 
> I want MS to call my php like this:
> http://my.ip/kmvims/test4.php?version=1.1.0&request=GetMap. This part
> works! 
> 

This works because MapServer is able to cascade GetMap requests...


> When calling 
> http://my.ip/cgi-bin/mapserv.exe?map=../htdocs/kmvims/test.map&version=1
> .1.0&request=GetFeatureInfo&query_layers=wms&x=251&y=329&INFO_FORMAT=tex
> t/plain 
> 
> I want MS to call my php like this:
> http://my.ip/kmvims/test4.php?version=1.1.0&request=GetFeatureInfo&query
> _layers=wms&x=251&y=329&INFO_FORMAT=text/plain 
> 
> So I could do the getFeatureInfo-processing in my php and just return a
> plain text, html or whatever MS needs to process. But MS refuses to call
> the php at all on doing a getFeatureInfo-req.
> 

... and this doesn't work because MapServer doesn't cascade 
GetFeatureInfo requests.  The main reason behind this is that the output 
of GetFeatureInfo requests is not clearly defined by WMS so MapServer 
would no know what to expect from the remote server.

Instead MapScript offers a $layer->getWMSFeatureInfoURL() method that 
will return you the GetFeatureInfo url for a click at a specified 
location on a WMS layer and it's up to your client application (PHP 
script) to call this URL and try to make sense of the result.

Daniel
-- 
------------------------------------------------------------
  Daniel Morissette               morissette at dmsolutions.ca
  DM Solutions Group              http://www.dmsolutions.ca/
------------------------------------------------------------




More information about the mapserver-users mailing list