[Users] FeatureInfo only showing for one layer?

Evans, Barry be208 at exeter.ac.uk
Fri Jan 14 16:42:33 CET 2011


I think this question may have been asked before but I've looked online and can't find it now. I'm using the following code to get feature information to display in a popup, for some reason however, it is only showing information from just one layer which is the first layer that is called into the map? Does anyone know if this is a problem with GeoExt or more likely something missing from code? Below is the snippet of code I am using for generating featureinfo popup:


var featureInfo = new OpenLayers.Control.WMSGetFeatureInfo();
                              featureInfo.events.on({
                              getfeatureinfo: function(e) {
                                    new GeoExt.Popup({
                                    title: "Feature Info",
                                    width: 200,
                                    height: 150,
                                    autoScroll: true,
                                    queryVisible: true,
                                    map: map,
            feature_count: 50,//Used as some layers consist of point data that are grouped in close proximity to each other
            lonlat: mapPanel.map.getLonLatFromPixel(e.xy),
                  html: e.text
        }).show();
                          }
});

mapPanel.map.addControl(featureInfo);
featureInfo.activate();



Any help would be greatly appreciated.

Kind regards,

Barry

Email: be208 at ex.ac.uk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.geoext.org/pipermail/users/attachments/20110114/2c32f1c2/attachment.htm 


More information about the Users mailing list