<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:arial,helvetica,sans-serif;font-size:10pt;color:#000000;">Hi,<br><br>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.<br><br>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?<br><br>To understand the problem try it out here.<br><br><a href="http://maps.zgb.de/www/eeg/eeg_portal.html">http://maps.zgb.de/www/eeg/eeg_portal.html</a><br><br><br>Here is the code for the search. I am using the protocol from the source layer "layer_wea".<br><br>//layer_wea<br>var layer_wea = new
OpenLayers.Layer.Vector("Windkraftanlagestandort", {<br> styleMap: style_wea,<br> projection: "EPSG:4326",<br> strategies: [new OpenLayers.Strategy.Fixed()],<br> protocol: new OpenLayers.Protocol.WFS({<br><span> url: "<a target="_blank" href="http://maps.zgb.de/geoserver/wfs">http://maps.zgb.de/geoserver/wfs</a>?",</span><br> version: "1.1.0",<br> featureType: "wea_wgs84",<br><span> featureNS: "<a target="_blank"
href="http://www.zgb.de/postgis">http://www.zgb.de/postgis</a>",</span><br> srsName: "EPSG:4326"<br> }),<br> eventListeners: {<br> featuresadded: function () {<br> var extent_wea = layer_wea.getDataExtent();<br> mapPanel_wea.map.zoomToExtent(extent_wea);<br> }<br> }<br> });<br><br>//search<br> // create a GeoExt form panel (configured with an OpenLayers.Protocol<br> //
instance)<br> <br> <br> var features = new Array();<br> var formPanel = new GeoExt.form.FormPanel({<br> width: 300,<br> height: 200,<br> region: "west",<br> protocol: layer_wea.protocol,<br> items: [{<br> xtype: "textfield",<br> name:
"bez__like",<br> value: "WF*",<br> fieldLabel: "bez"<br> }],<br> listeners: {<br> actioncomplete: function(form, action) {<br> // this listener triggers when the search request<br> // is complete, the
OpenLayers.Protocol.Response<br> // resulting from the request is available<br> // through "action.response"<br> features = action.response.features;<br> store_wea.loadData(features);<br> <br> }<br> }<br>
});<br> formPanel.addButton({<br> text: "search",<br> handler: function() {<br> this.search();<br> },<br> scope: formPanel<br> });<br> <br> var searchwin = new Ext.Window({<br> title: "wfs search",<br> layout: 'fit',<br> width: 200,<br>
x:300,<br> collapsible: true,<br> height: 100,<br> closeAction: 'hide',<br> plain: true,<br> items: [formPanel]<br> });<br><br><br><br>If anyone has any clues iŽd be grateful,<br><br>yours,<br><br>Rob<br><div><br></div>
</div></body></html>