Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I use WMS layer in my app and could successfully retrieved Feature Info by click like so:

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
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'… – Devdatta Tengshe May 8 '13 at 3:57

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


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.