[Geoserver-users] WMS featureInfo info_format

Hello.

I’ve tried to get the response from a featureInfo-request to some other format then text/plain or text/html. Is this possible?

When I set info_format to text/xml the response is in plain text format but with an xml-header…

http://XXX.XXXX.XX/geoserver/wms?bbox=-130,24,-66,50&styles=population&format=jpeg&info_format=text/xml&request=GetFeatureInfo&layers=topp:states&query_layers=topp:states&width=550&height=250&x=170&y=160

Some other formats beside html and plain text would be sweet to have… =) JSON for example!

Anyone how knows if this is planned for in some comming release?


Best regards**:**

Mårten Swärd

Systemdeveloper

SMHI, Swedish Meteorological and Hydrological Institut

Tel: +46 11 495 8469

Swärd Mårten ha scritto:

Hello.

I’ve tried to get the response from a featureInfo-request to some
other format then text/plain or text/html. Is this possible?

When I set info_format to text/xml the response is in plain text
format but with an xml-header…

_http://__XXX.XXXX.XX/geoserver__/wms?bbox=-130,24,-66,50&styles=population&format=jpeg&info_format=text/__xml__&request=GetFeatureInfo&layers=topp:states&query_layers=topp:states&width=550&height=250&x=170&y=160_
<http://XXX.XXXX.XX/geoserver/wms?bbox=-130,24,-66,50&styles=population&format=jpeg&info_format=text/xml&request=GetFeatureInfo&layers=topp:states&query_layers=topp:states&width=550&height=250&x=170&y=160&gt;

Some other formats beside html and plain text would be sweet to
have.. =) JSON for example!

Anyone how knows if this is planned for in some comming release?

It may be, yet usually developers do create a such a plugin as they
need it so there is no actual plan. What you can do is to
do a WFS GetFeature request instead, that already supports geojson
output.
Alternatively, if you want to develop the new output format yourself,
we can try to point you in the right direction (you know, setting up
the developer enviroment, understand which classes you need to add,
and so on).

Hope this helps
Cheers
Andrea