[mapserver-dev] GetFeatureInfo problems

Lime, Steve D (MNIT) Steve.Lime at state.mn.us
Tue Mar 5 05:45:41 PST 2013

I'm sure there's a way to trap the error. Sounds like you're not running straight MapScript code though (e.g. $layer->queryByPoint(...);). I'll have to checkout your script.

EMPTY and ERROR are attributes of the WEB object.


From: mapserver-dev-bounces at lists.osgeo.org [mapserver-dev-bounces at lists.osgeo.org] on behalf of Fabian Schindler [fabian.schindler at eox.at]
Sent: Tuesday, March 05, 2013 7:31 AM
To: mapserver-dev at lists.osgeo.org
Subject: Re: [mapserver-dev] GetFeatureInfo problems

Hash: SHA1


> Regarding the templating, I don't think that's a bug. When nothing
> is matched no templates are rendered. Instead an error is thrown
> and the normal error handling mechanisms (using ERROR and
> optionally in this case EMPTY) are used. May not be ideal but
> that's how it works.

I assumed that when the query did not match any features at least the
Header/Footer is returned. Is there a possibility in mapscript to
react to the fact that there were no results? What do you mean by
`ERROR` and `EMPTY`? Are these internals to the mapserver template


> ________________________________________ From:
> mapserver-dev-bounces at lists.osgeo.org
> [mapserver-dev-bounces at lists.osgeo.org] on behalf of Fabian
> Schindler [fabian.schindler at eox.at] Sent: Tuesday, March 05, 2013
> 4:13 AM To: mapserver-dev at lists.osgeo.org Subject: [mapserver-dev]
> GetFeatureInfo problems
> Dear devs,
> I just stumbled over what I think is a bug in both the templating
> mechanism aswell as the msIO system (or the Python mapscript
> interface to it). I added a minimal map, template and script in the
> attachment.
> Basically what I do is the following: - Dynamically create a map
> with one layer - Set up an html template - Add a shape (feature) to
> the layer - Dispatch a WMS 1.3 GetFeatureInfo request
> When the request "hits" the feature, all is well and I get a
> correct template response. On the other hand, when I "miss" the
> feature no templates are rendered, even the header and footer are
> left out; which I consider the first bug.
> The second problem is when I try to retrieve the bytes from the
> installed stdout buffer (+content type):
> msIO_stripStdoutBufferContentType: General error message. Corrupt
> Content-Type header.
> If I use `msIO_getStdoutBufferBytes()` instead, I get the
> following: 'Content-Type: text/html\r\n\r\n' so it seems that the
> header is correct, but the response content is simply missing.
> I get correct (still empty) responses when I use other response
> formats like GML or text/plain.
> Is there a possibility to get the correct content-type / response
> from such degenerated messages?
> Regards Fabian

Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

mapserver-dev mailing list
mapserver-dev at lists.osgeo.org

More information about the mapserver-dev mailing list