[Users] Cannot get feature info to work with layers loaded from getcapabilities doc.

Robert Buckley robertdbuckley at yahoo.com
Tue Jan 18 19:32:22 CET 2011


    Hi,

I have layers in a mapPanel which can be queried without problem.

I also have a getcapabilities window which loads layers into the map. But these 
layers do not get a response from the getFeatureInfo method.


Could anyone offer any suggestion as to why this doesn´t happen?

yours,

Robert


CODE FOR THE POPUPS

// create the popup
var featureInfo = new OpenLayers.Control.WMSGetFeatureInfo({
    queryVisible: true,
    highlightOnly: false,
    maxFeatures: 2,

});


featureInfo.events.on({
    getfeatureinfo: function(e) {
        new GeoExt.Popup({
            title: "INFO",
            width: 300,
            height : 200,
            autoHeight: true,
            layout: 'fit',
            bodyStyle: 'background-color:#FFF;,font-size:14px;',
            autoScroll: true,
            maximizable: true,
            map: mapPanel.map,
            lonlat: mapPanel.map.getLonLatFromPixel(e.xy),
            html: e.text,
            unpinnable:true,
            anchored: true,
            shadow: true,
            listeners: {
                    close: function() {
                        // closing a popup destroys it, but our reference is 
truthy
                        popup = null;
                    }
                }

        }).show();
    }
});

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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.geoext.org/pipermail/users/attachments/20110118/e8a02e5b/attachment.htm 


More information about the Users mailing list