<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:arial,helvetica,sans-serif;font-size:10pt">I tried your suggestion and it doesn´t work for me.<br><br>Thanks anyway,<br><br>Rob<br><div><br></div><div style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"><br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><font face="Tahoma" size="2"><hr size="1"><b><span style="font-weight: bold;">Von:</span></b> "Daniel.Behr@hzg.de" <Daniel.Behr@hzg.de><br><b><span style="font-weight: bold;">An:</span></b> robertdbuckley@yahoo.com<br><b><span style="font-weight: bold;">CC:</span></b> users@geoext.org<br><b><span style="font-weight: bold;">Gesendet:</span></b> Samstag, den 9. Juli 2011, 17:05:21 Uhr<br><b><span style="font-weight: bold;">Betreff:</span></b> Re: [Users] why are my Search form results not georeferenced?<br></font><br><font face="Vorgabe Sans
Serif,Verdana,Arial,Helvetica,Sans-Serif" size="2">Hi Robert,<div>have you tried this:</div><div><br></div><div><span class="Apple-style-span" style="font-family: arial,helvetica,sans-serif;">var layer_wea = new OpenLayers.Layer.Vector("Windkraftanlagestandort", {<br> styleMap: style_wea,<br>// projection: "EPSG:4326", // <--- I think you dont need this <br> strategies: [new OpenLayers.Strategy.Fixed()],<br> protocol: new OpenLayers.Protocol.WFS({<br><span> url: "<a rel="nofollow" target="_blank" href="http://maps.zgb.de/geoserver/wfs" style="text-decoration: underline;"><font color="#0000ff">http://maps.zgb.de/geoserver/wfs</font></a>?",</span><br> version:
"1.1.0",<br> featureType: "wea_wgs84",<br><span> featureNS: "<a rel="nofollow" target="_blank" href="http://www.zgb.de/postgis" style="text-decoration: underline;"><font color="#0000ff">http://www.zgb.de/postgis</font></a>",</span><br> srsName: "EPSG:900913" // <--- = your basemap SRS<br></span><span class="Apple-style-span" style="font-family: arial,helvetica,sans-serif;"> }),<br></span></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif"><br></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif">cheers</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif">Daniel</font></div><div><font class="Apple-style-span" face="arial,
helvetica, sans-serif"><br></font><font color="#990099">-----users-bounces@geoext.org schrieb: -----</font><div><blockquote style="padding-right: 0px; padding-left: 5px; margin-left: 5px; border-left: 2px solid black; margin-right: 0px;">An: users@geoext.org<br>Von: Robert Buckley <br>Gesendet von: users-bounces@geoext.org<br>Datum: 09.07.2011 11:46AM<br>Betreff: [Users] why are my Search form results not georeferenced?<br><br><div style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"><font 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 rel="nofollow" target="_blank" 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 rel="nofollow" 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 rel="nofollow" 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>
</font></div><font face="Courier New,Courier,Feste Breite" size="3">_______________________________________________<br>Users mailing list<br>Users@geoext.org<br><a rel="nofollow" target="_blank" href="http://www.geoext.org/cgi-bin/mailman/listinfo/users">http://www.geoext.org/cgi-bin/mailman/listinfo/users</a><br></font></blockquote></div></div></font><br>
<font face="Arial">Helmholtz-Zentrum Geesthacht<br>
Zentrum für Material- und Küstenforschung GmbH</font><br>
<font face="Arial">Max-Planck-Straße 1<br>
21502 Geesthacht<br>
Deutschland/Germany<br>
<br>
Geschäftsführer/Board of Management: Prof. Dr. Wolfgang Kaysser, Dipl.-Ing. Michael Ganß <br>
Vorsitzender des Aufsichtsrates/Chairman of the Supervisory Board: Ministerialrat Wilfried Kraus<br>
<br>
Amtsgericht Lübeck HRB 285 GE (Register Court)<br>
Internet: </font><a rel="nofollow" target="_blank" href="http://www.hzg.de"><u><font color="#0000ff" face="Arial">http://www.hzg.de</font></u></a><font face="Arial"><br>
<br>
</font><br>
<font face="Arial">ACHTUNG - ATTENTION<br>
</font><br>
<font face="Arial">Die Helmholtz-Zentrum Geesthacht Zentrum für Material- und Küstenforschung GmbH<br>
hieß bis zum 1. November 2010 GKSS-Forschungszentrum Geesthacht GmbH.</font><br>
<br>
<font face="Arial">Until 1st November 2010 the Helmholtz-Zentrum Geesthacht Zentrum für Material- und Küstenforschung GmbH was officially called GKSS-Forschungszentrum Geesthacht GmbH.<br>
</font>
</div></div>
</div></body></html>