GeoExt info Popup is very easy to use but when one or more layer is missing or fails to load Avoiding Pink Tyles. The popup is not filled with the values. While I can see that request is sent to the server and response is there but popup is blank. Is there any way to handle this condition without building custom component?
OpenLayers.Util.onImageLoadErrorColor = 1;
OpenLayers.Util.onImageLoadErrorColor = "transparent";
OpenLayers.Util.onImageLoadError = function(){
this.src = "/img/blank.gif";
};
controls.push(new OpenLayers.Control.WMSGetFeatureInfo({
autoActivate: true,
infoFormat: "application/vnd.ogc.gml",
maxFeatures: 3,
eventListeners: {
"getfeatureinfo": function(e) {
var items = [];
Ext.each(e.features, function(feature) {
items.push({
xtype: "propertygrid",
title: feature.fid,
source: feature.attributes
});
});
new GeoExt.Popup({
title: "Info",
width: 200,
height: 200,
layout: "accordion",
map: app.mapPanel,
location: e.xy,
maximizable: true,
collapsible: true,
items: items
}).show();
}
}
}));