Hi everyone, now I tried to implement search attribute panel to search for a feature and add the result to map. I'm modify the example from http://ian01.geog.psu.edu/geoserver_docs/apps/gaz/search.html
Here my SearchPanel script:
formPanel = new GeoExt.form.FormPanel({
height: 100,
region: "north",
protocol: protocol,
items: [{
xtype: "textfield",
name: "ID_AFVOER__like",
value: "SAHA",
fieldLabel: "ID Afvoer"
}],
listeners: {
actioncomplete:
function(form, action) {
features =
action.response.features;
store.loadData(features);
vm=map.getLayersByName("Results");
if(vm.length==0){
vecLayer = new OpenLayers.Layer.Vector("Results");
map.addLayer(vecLayer);
store.bind(vecLayer);
select.bind(vecLayer);
}
}
}
});
formPanel.addButton({
text: "search",
handler: function() {
this.search();
},
scope: formPanel
});
_______________________________________________
Users mailing list
[email protected]
http://www.geoext.org/cgi-bin/mailman/listinfo/users
