I have done point layer overlay with OpenLayers. Whenever I click any point, it's 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(
"ABCD",
map.getLonLatFromPixel(event.xy),
null,
event.text,
null,
true
));
}
}
});
map.addControl(info);
info.activate();