I have created a gxp client where I have added some layer in the initial map settings and some layer can be added using gxp Add Layers plugin. When I add these layers to the map there is no issue with them, I can get their properties in gxp layer properties plugin, print and getfeatureinfo for them. But I also need to add some of the layers using and apply filter on it. Now the problem in this method is that it doesn't create GeoExt.data.LayerRecord and these funtions are not available for this layer. How can a create a layer record for the following layer so that getfeatureinfo, print and layer properties function should work.

filterLayer = new OpenLayers.Layer.WMS(title,
        "/geoserver/wms", {
        layers : 'ws:layername',
        transparent : true,
        styles : style
    }, {
        isBaseLayer : false

I also tried but this also didn't work.

var recordType = GeoExt.data.LayerRecord.create(); 
var record = new recordType({layer: filterLayer, title: "test Layer"}); 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.