On Thu, Jan 31, 2013 at 7:41 PM, Martin Davis <mtnclimb@anonymised.com> wrote:
We’re running GS 2.1.4, and trying to get JSON emitted as the output format for WMS GetFeatureInfo.
The URL we’re using is generated by OpenLayers and looks like:
http://tom1/geoserver/wms?LAYERS=CIS_LKI_SEGMENT_PUBLISHED_V&QUERY_LAYERS=CIS_LKI_SEGMENT_PUBLISHED_V&STYLES=&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetFeatureInfo&BBOX=437798.846609%2C303877.971488%2C1954309.487576%2C1820388.612455&FEATURE_COUNT=3&HEIGHT=620&WIDTH=620&FORMAT=image%2Fpng&INFO_FORMAT=application%2Fjson&SRS=EPSG%3A3005&X=250&Y=117&PROPERTYNAME=LKI_SEGMENT_EXT_ID%2COPPOSITE_LKI_SEGMENT_EXT_ID
Note the INFO_FORMAT=application%2Fjson, which appears correct.
However, this generates the error:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
Invalid format 'application/json', supported formats are [text/plain, application/vnd.ogc.gml, text/html]
We enabled ENABLE_JSONP in case there was some interaction there (although there shouldn’t be), but it didn’t fix the problem.
Did 2.1.4 support JSON output for WMS GetFeatureInfo? And if so, any reason it would be disabled?
Hum… I don’t think it did. Going by memory, support for JSON was added only
recently in the 2.2.x series (as in, a few days ago, with the backport of
Carlo’s work, right after the 2.2.4 release).
Cheers
Andrea
–
Ing. Andrea Aime
@geowolf
Technical Lead
GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549
http://www.geo-solutions.it
http://twitter.com/geosolutions_it