[Users] Query Panel
Francesc Cañas
kikocanas at gmail.com
Thu Apr 5 12:28:03 CEST 2012
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.t <http://kikocanas.blogspot.com>k
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.geoext.org/pipermail/users/attachments/20120405/b05c0cb1/attachment.htm
More information about the Users
mailing list