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 use WMS layer in my app and could successfully retrieved Feature Info by click like so: http://openlayers.org/dev/examples/getfeatureinfo-control.html

My question is: Is there any way to export the retrieved data in separate variables? So that I can organize the popup instead id this table. I see that its an XML file but still can't find a way to handle it.

share|improve this question
1  
What is your server? Are you using Geoserver of MapServer? if so which version? –  Devdatta Tengshe May 8 '13 at 2:49
    
Yes, GeoServer 2.2.3 –  Shadin May 8 '13 at 3:13
    
If you can upgrade to version 2.3.0 or higher, than you can get native JSON output. Otherwise you can try this 'hack' gis.stackexchange.com/questions/44734/… –  Devdatta Tengshe May 8 '13 at 3:57

1 Answer 1

I think you can set

format: new OpenLayers.Format.GML(), // Used to parse the feature info response

infoFormat: 'application/vnd.ogc.gml', // Used to require the WMS server to provide GML format

When you set up your getfeatureinfo control. This should provide the information in a JavaScript variable you can interact with (event.features).

share|improve this answer

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.