Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I have Geoserver 2.2.4 installed - which allows GetFeatureInfo to be returned as json

If I make the following call

http://[servername]/geoserver/[namespace]/wms?LAYERS=[layername]&QUERY_LAYERS[layername]&STYLES=&SERVICE=WMS&VERSION=1.3&REQUEST=GetFeatureInfo&BBOX=299856.403448%2C528892.700948%2C300279.736552%2C529316.034052&FEATURE_COUNT=10&HEIGHT=600&WIDTH=600&FORMAT=image%2Fpng&INFO_FORMAT=application%2Fjson&SRS=EPSG%3A27700&X=249&Y=447&EXCEPTIONS=application%2Fjson

I get a exception response of

Invalid format 'application/json', supported formats are [text/plain, application/vnd.ogc.gml, application/vnd.ogc.gml/3.1.1, text/html]

I have checked getcapabilities for this service and only the following are available

<GetFeatureInfo>
    <Format>text/plain</Format>
    <Format>application/vnd.ogc.gml</Format>
    <Format>application/vnd.ogc.gml/3.1.1</Format>
    <Format>text/html</Format>
</GetFeatureInfo>

So is there any extra config I need to do to Geoserver to get it to output in json for GetFeatureInfo?

share|improve this question
    
Do you use a template for GetFeaturesInfo? docs.geoserver.org/latest/en/user/tutorials/GetFeatureInfo/… –  Mapperz Feb 19 '13 at 16:10
2  
Are you sure it is supported in 2.2.4? The following bug report says that it is fixed in 2.2.5? (jira.codehaus.org/browse/GEOS-1294) –  Devdatta Tengshe Feb 19 '13 at 16:17
2  
I think Devdatta might be right. I was never able to get a JSON response running 2.2.4 –  Taylor H. Feb 19 '13 at 16:22
    
@Devdatta Is 2.2.5 available? –  Peter Campbell Feb 19 '13 at 16:22
    
@Mapperz I am aware you can use templates, I wanted to be able to request json format –  Peter Campbell Feb 19 '13 at 16:23
show 3 more comments

1 Answer 1

up vote 1 down vote accepted

Seems to be that despite documentation saying the the JSON output for GetFeatureInfo is available in 2.2.4, it will not be available until a future version.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.