[Users] Hwo to create a better wmsgetfeatureinfo window ?

Robert Buckley robertdbuckley at yahoo.com
Mon Mar 5 20:19:13 CET 2012


Hi,

I want to create a more user friendly info window for my getFeatureInfo tool

I have seen example apps where the getfeature info is outputted to an accordion window....for some reason I can´t get this to work. Is anyone able to show me some code in able to modify my present ext.popup shown below...I have tried to create the accordion window, but it doesn´t work...it is shows an ext.window!?! even though I have defined layout: "accordion",!!!

thanks.

RB

// GetFeatureInfo tool ouputs all features into one window :-(

var featureInfo = new OpenLayers.Control.WMSGetFeatureInfo({
    layers: [layer_rrop_15,layer_rrop_14,layer_rrop_13,layer_rrop_13_l,layer_rrop_13_p,layer_rrop_hws,layer_rrop_11_22,layer_rrop_11,layer_rrop_10,layer_rrop_09,layer_rrop_08,layer_rrop_05,layer_rrop_04,layer_rrop_03_l,layer_rrop_03,layer_rrop_02_l,layer_rrop_02,layer_rrop_01], 
   // infoFormat: "application/vnd.ogc.gml",   
        queryVisible: true,
        highlightOnly: false,
        maxFeatures: 20,
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({
                url: "/geoserver/ows",
                title: "Info",
                width: 200,
                autoheight: true,
                layout: "accordion",
                bodyStyle: 'background-color:#FFF;,font-size:14px;',
                autoScroll: true,
                maximizable: true,
                map: mapPanel.map,
                lonlat: mapPanel.map.getLonLatFromPixel(e.xy),
                html: e.text,
                maximizable: true,
                collapsible: true,
                items: items 
                }).show(); 
        }
        }
    });
    map.addControl(featureInfo);
    featureInfo.activate();
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.geoext.org/pipermail/users/attachments/20120305/07a7dc4a/attachment.htm 


More information about the Users mailing list