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'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. </div>
<div><br></div><div><br></div><div><script src="<a href="http://gxp.opengeo.org/master/script/gxp.js">http://gxp.opengeo.org/master/script/gxp.js</a>"></script></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: "Query Panel",</div>
<div> width: 300,</div><div> bodyStyle: "padding: 10px",</div><div> autoScroll: true,</div><div> layerStore: mapPanel.layers,</div><div> bbar: ["->",</div>
<div> {</div><div> text: "Query",</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("", {</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("name"),</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:"100%",value:this.getFormattedMapExtent()});this.map.events.on({moveend:this.updateMapExtent,scope:this});this.createFilterBuilder(this.layerStore.getAt(0));this.items=[{xtype:"combo",name:"layer",fieldLabel:this.layerText,store:this.layerStore,value:this.layerStore.getAt(0).get("name"),displayField:"title",valueField:"name",mode:"local",allowBlank:!0,editable:!1,triggerAction:"all",listeners:{beforeselect:function(a,b){return this.fireEvent("beforelayerchange",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>