<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi,<div><br></div><div>please don't ask GXP questions on this list, use <a href="https://getsatisfaction.com/opengeo">https://getsatisfaction.com/opengeo</a> instead.</div><div><br></div><div>Best regards,</div><div>Bart</div><div><br><div>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div>-- <br>Bart van den Eijnden<br>OpenGeo - <a href="http://opengeo.org/">http://opengeo.org</a><br>Expert service straight from the developers.</div><div><br></div></span><br class="Apple-interchange-newline">
</div>
<br><div><div>On Apr 5, 2012, at 12:28 PM, Francesc Cañas wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">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>
_______________________________________________<br>Users mailing list<br><a href="mailto:Users@geoext.org">Users@geoext.org</a><br>http://www.geoext.org/cgi-bin/mailman/listinfo/users<br></blockquote></div><br></div></body></html>