Hi,
After trying to install a search form into my project, I have had limited
success. I can run the search and get correct results. The only problem is that
all results are positioned at 0,0 off the coase of Africa and not where they
are
supposed to be.
I have obviously overlooked something rudimentary here. This type of issue is
usually due to the wrong SRS being assigned, but if this were the case, why
does
the grid work fine before the search is actived?
To understand the problem try it out here.
http://maps.zgb.de/www/eeg/eeg_portal.html
Here is the code for the search. I am using the protocol from the source layer
"layer_wea".
//layer_wea
var layer_wea = new OpenLayers.Layer.Vector("Windkraftanlagestandort", {
styleMap: style_wea,
projection: "EPSG:4326",
strategies: [new OpenLayers.Strategy.Fixed()],
protocol: new OpenLayers.Protocol.WFS({
url: "http://maps.zgb.de/geoserver/wfs?",
version: "1.1.0",
featureType: "wea_wgs84",
featureNS: "http://www.zgb.de/postgis",
srsName: "EPSG:4326"
}),
eventListeners: {
featuresadded: function () {
var extent_wea = layer_wea.getDataExtent();
mapPanel_wea.map.zoomToExtent(extent_wea);
}
}
});
//search
// create a GeoExt form panel (configured with an OpenLayers.Protocol
// instance)
var features = new Array();
var formPanel = new GeoExt.form.FormPanel({
width: 300,
height: 200,
region: "west",
protocol: layer_wea.protocol,
items: [{
xtype: "textfield",
name: "bez__like",
value: "WF*",
fieldLabel: "bez"
}],
listeners: {
actioncomplete: function(form, action) {
// this listener triggers when the search request
// is complete, the OpenLayers.Protocol.Response
// resulting from the request is available
// through "action.response"
features = action.response.features;
store_wea.loadData(features);
}
}
});
formPanel.addButton({
text: "search",
handler: function() {
this.search();
},
scope: formPanel
});
var searchwin = new Ext.Window({
title: "wfs search",
layout: 'fit',
width: 200,
x:300,
collapsible: true,
height: 100,
closeAction: 'hide',
plain: true,
items: [formPanel]
});
If anyone has any clues i´d be grateful,
yours,
Rob_______________________________________________
Users mailing list
[email protected]
http://www.geoext.org/cgi-bin/mailman/listinfo/users