[Users] Query Panel

Bart van den Eijnden bartvde at opengeo.org
Thu Apr 5 12:38:02 CEST 2012


Hi,

please don't ask GXP questions on this list, use https://getsatisfaction.com/opengeo instead.

Best regards,
Bart

-- 
Bart van den Eijnden
OpenGeo - http://opengeo.org
Expert service straight from the developers.



On Apr 5, 2012, at 12:28 PM, Francesc Cañas wrote:

> Hi,
> 
> I want to put a Query Panel to my map as the one in GeoEditor of Open Geo Suite. I've found the gxp query panel but i don't know how it works. The only change I've made is the layerStore where I've put my layerStore mapPanel.layers. 
> 
> 
> <script src="http://gxp.opengeo.org/master/script/gxp.js"></script>
> 
> 
> 
> 
> //**********************************************  Query Panel  **************************
> 
> var queryPanel = new gxp.QueryPanel({
>                 title: "Query Panel",
>                width: 300,
>                bodyStyle: "padding: 10px",
>                 autoScroll: true,
>                 layerStore: mapPanel.layers,
>                 bbar: ["->",
>                 {
>                   text: "Query",
>                   handler: function () {
>                     queryPanel.query();
>                   }
>                 }],
>                 listeners: {
>                   query: function (panel, store) {
>                     wms.setVisibility(false);
>                     var rule = new OpenLayers.Rule({
>                       filter: panel.getFilter()
>                     });
>                     rule.symbolizer[queryPanel.symbolizerType] = symbolizer;
>                     var style = new OpenLayers.Style("", {
>                       rules: [rule]
>                     });
>                     wms.mergeNewParams({
>                       sld_body: new OpenLayers.Format.SLD().write({
>                       namedLayers: [{
>                           name: panel.selectedLayer.get("name"),
>                           userStyles: [style]
>                         }]
>                       })
>                     });
>                     store.bind(vecLayer, {
>                       initDir: GeoExt.data.FeatureStore.STORE_TO_LAYER
>                     });
>                   }
>                 }
>               });
> 
> 
> But Firebugs says: 
> 
> this.map is undefined
> error source line:  gxp.js (línea 637)
> 	
> ...fieldLabel:this.layerText,store:this.layerStore,value:this.layerStore.getAt(0).g...
> 
> 
> Thanks!
> 
> -- 
> http://kikocanas.tk
> 
> 
> _______________________________________________
> Users mailing list
> Users at geoext.org
> http://www.geoext.org/cgi-bin/mailman/listinfo/users

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


More information about the Users mailing list