Hi,<div><br></div><div>I want to put a Query Panel to my map as the one in GeoEditor of Open Geo Suite. I&#39;ve found the gxp query panel but i don&#39;t know how it works. The only change I&#39;ve made is the layerStore where I&#39;ve put my layerStore mapPanel.layers. </div>
<div><br></div><div><br></div><div>&lt;script src=&quot;<a href="http://gxp.opengeo.org/master/script/gxp.js">http://gxp.opengeo.org/master/script/gxp.js</a>&quot;&gt;&lt;/script&gt;</div><div><br></div><div><br></div><div>
<br></div><div><br></div><div><div>//**********************************************  Query Panel  **************************</div><div><br></div><div>var queryPanel = new gxp.QueryPanel({</div><div>                title: &quot;Query Panel&quot;,</div>
<div>               width: 300,</div><div>               bodyStyle: &quot;padding: 10px&quot;,</div><div>                autoScroll: true,</div><div>                layerStore: mapPanel.layers,</div><div>                bbar: [&quot;-&gt;&quot;,</div>
<div>                {</div><div>                  text: &quot;Query&quot;,</div><div>                  handler: function () {</div><div>                    queryPanel.query();</div><div>                  }</div><div>                }],</div>
<div>                listeners: {</div><div>                  query: function (panel, store) {</div><div>                    wms.setVisibility(false);</div><div>                    var rule = new OpenLayers.Rule({</div><div>
                      filter: panel.getFilter()</div><div>                    });</div><div>                    rule.symbolizer[queryPanel.symbolizerType] = symbolizer;</div><div>                    var style = new OpenLayers.Style(&quot;&quot;, {</div>
<div>                      rules: [rule]</div><div>                    });</div><div>                    wms.mergeNewParams({</div><div>                      sld_body: new OpenLayers.Format.SLD().write({</div><div>                      namedLayers: [{</div>
<div>                          name: panel.selectedLayer.get(&quot;name&quot;),</div><div>                          userStyles: [style]</div><div>                        }]</div><div>                      })</div><div>                    });</div>
<div>                    store.bind(vecLayer, {</div><div>                      initDir: GeoExt.data.FeatureStore.STORE_TO_LAYER</div><div>                    });</div><div>                  }</div><div>                }</div>
<div>              });</div></div><div><br></div><div><br></div><div>But Firebugs says: </div><div><br></div><div>this.map is undefined</div><div><span class="offScreen">error source line: </span><a tabindex="-1" class="objectLink objectLink-sourceLink a11yFocus "><div class=" " style="display:inline!important">
gxp.js (línea 637)</div></a></div><span class="objectBox objectBox-errorMessage hasTwisty hasBreakSwitch "><div tabindex="0" class="errorSourceBox errorSource-show focusRow subLogRow a11yModified"><table class=" " cellpadding="0" cellspacing="0">
<tbody class=" "><tr class=" "><td class=" "><img tabindex="-1" src="chrome://firebug/content/blank.gif" title="Parar en este error" class="errorBreak a11yFocus "></td><td class=" "><a tabindex="-1" class="errorSource a11yFocus "><pre title="readOnly:!0,anchor:&quot;100%&quot;,value:this.getFormattedMapExtent()});this.map.events.on({moveend:this.updateMapExtent,scope:this});this.createFilterBuilder(this.layerStore.getAt(0));this.items=[{xtype:&quot;combo&quot;,name:&quot;layer&quot;,fieldLabel:this.layerText,store:this.layerStore,value:this.layerStore.getAt(0).get(&quot;name&quot;),displayField:&quot;title&quot;,valueField:&quot;name&quot;,mode:&quot;local&quot;,allowBlank:!0,editable:!1,triggerAction:&quot;all&quot;,listeners:{beforeselect:function(a,b){return this.fireEvent(&quot;beforelayerchange&quot;,this,b)},select:function(a," class="errorSourceCode ">
...fieldLabel:this.layerText,store:this.layerStore,value:this.layerStore.getAt(0).g...</pre></a></td></tr></tbody></table></div></span><div><br></div><div><br></div><div>Thanks!</div><div><br>-- <br><a href="http://kikocanas.blogspot.com" target="_blank">http://kikocanas.t</a>k<div>
<br></div><br>
</div>