Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

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 have done point layer overlay with openlayer. Whenever i click any point, its showing me all the data of the table(postgresql) in popup. How to control amount of data in the popup?

All the columns are being displayed in popup. I just want location_name to be displayed in the popup. how to extract location_name from event.text?

Code is:

info = new OpenLayers.Control.WMSGetFeatureInfo({
    url: 'http://localhost:8080/geoserver/layername/wms',  // geoserver point layer 
    title: 'Identify features by clicking',
    queryVisible: true,
    eventListeners: {
        getfeatureinfo: function(event) {
            map.addPopup(new OpenLayers.Popup.FramedCloud(
share|improve this question

Instead of event.text just send whatever HTML you want to have displayed.

You can do this by calling a fuction with event.text as argument, and then parsing output and returning whatever you want.

Try looking at event.features and extracting info from there, and then constructing HTML string with that info. I thing then you should pass just event. Try looking at that object in Firebug or Chrome dev. tools.

share|improve this answer
That's too cumbersome process!! Any other way out? – xtras Apr 9 '13 at 13:49

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.