Thanks Kai,<br><br>But I dont have an idea how to write a proxy... do you know where can I find some tips or a generic one?<br><br><div class="gmail_quote">On Wed, Feb 18, 2009 at 8:01 AM, Kai Behncke <span dir="ltr"><<a href="mailto:Kai-Behncke@gmx.de">Kai-Behncke@gmx.de</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Dear Raphael,<br>
<br>
I had also some problems with the wfs proxy-host.<br>
<br>
In my case it was because I wrote the code of the proxy-host on a Windows-Machine and loaded it on a linux-server, there were some problem with the word wraps then (maby by coincidence you have the same error). I solved it with a dos2unix-compilation at the unix-server.<br>
<div class="Ih2E3d"><br>
<br>
<br>
> I'm starting to think why use Openlayers... this ProxyHost is a really<br>
> bitch.<br>
<br>
<br>
</div>Well, sometimes, at the beginning, OpenLayers is not soooooo easy, but after a while and some steps of learning it really starts to make big fun.<br>
So don`t give up :-)<br>
<br>
Beste regards, Kai<br>
<div><div></div><div class="Wj3C7c"><br>
><br>
> On Tue, Feb 17, 2009 at 2:25 PM, Arnd Wippermann<br>
> <<a href="mailto:arnd.wippermann@web.de">arnd.wippermann@web.de</a>>wrote:<br>
><br>
> > Hi,<br>
> ><br>
> > for local addresses you don't need a proxy host. To be sure, that your<br>
> > local address is used I would use relative path.<br>
> ><br>
> > OpenLayers.ProxyHost="/cgi-bin/proxy.cgi/?url="<br>
> ><br>
> > and you can also try to load your WFS with relative path. Then the proxy<br>
> > script is not used. Not 100% sure but only addresses, which begins with<br>
> http<br>
> > , use the proxy script.<br>
> ><br>
> > // Layer WFS<br>
> > wfs = new OpenLayers.Layer.WFS(<br>
> > "Quadras WFS",<br>
> > "/geoserver/wfs",<br>
> > {typename: 'topp:quadra'},<br>
> ><br>
> > If your WFS is now loaded, then there seems something wrong with your<br>
> proxy<br>
> > script or configuration. If not loaded, copy the WFS request from<br>
> firebug<br>
> > into the address bar of your browser, to be sure that the request send a<br>
> > valid response.<br>
> ><br>
> > Arnd Wippermann<br>
> ><br>
> > ------------------------------<br>
> > *Von:* <a href="mailto:users-bounces@openlayers.org">users-bounces@openlayers.org</a><br>
> [mailto:<a href="mailto:users-bounces@openlayers.org">users-bounces@openlayers.org</a>]<br>
> > *Im Auftrag von *Raphael Saldanha<br>
> > *Gesendet:* Dienstag, 17. Februar 2009 02:10<br>
> > *An:* <a href="mailto:users@openlayers.org">users@openlayers.org</a><br>
> > *Betreff:* [OpenLayers-Users] WFS ProxyHost<br>
> ><br>
> > Hi!<br>
> ><br>
> > I'm having some troubles on trying to use WFS...<br>
> ><br>
> > As suggested in the FAQ, and put the proxy.cgi on cgi-bin Apache folder,<br>
> > and add the line "AddHandler python-cgi-script .cgi" on httpd.conf, as<br>
> > suggested in <a href="http://gist.fas.harvard.edu/chgis/?p=14" target="_blank">http://gist.fas.harvard.edu/chgis/?p=14</a>.<br>
> ><br>
> > But loading the following page, I receive the error 1012, on Firebug.<br>
> ><br>
> > Help please!!!<br>
> ><br>
> > <html><br>
> > <head><br>
> > <title>IPTU</title><br>
> > <link rel="stylesheet" type="text/css" href="<br>
> > <a href="http://localhost:8080/geoserver/openlayers/theme/default/style.css" target="_blank">http://localhost:8080/geoserver/openlayers/theme/default/style.css</a>"/><br>
> ><br>
> ><br>
> ><br>
> ><br>
> > <!-- Import OpenLayers, reduced, wms read only version --><br>
> > <script src="<br>
> > <a href="http://localhost:8080/geoserver/openlayers/OpenLayers.js" target="_blank">http://localhost:8080/geoserver/openlayers/OpenLayers.js</a>"<br>
> > type="text/javascript"></script><br>
> > <script defer="defer" type="text/javascript"><br>
> > var map;<br>
> > var quadra;<br>
> > var imagem;<br>
> > var wfs;<br>
> ><br>
> > OpenLayers.ProxyHost="<br>
> > <a href="http://localhost:8080/cgi-bin/proxy.cgi/?url=" target="_blank">http://localhost:8080/cgi-bin/proxy.cgi/?url=</a>";<br>
> ><br>
> > // pink tile avoidance<br>
> > OpenLayers.IMAGE_RELOAD_ATTEMPTS = 5;<br>
> > // make OL compute scale according to WMS spec<br>
> > OpenLayers.DOTS_PER_INCH = 25.4 / 0.28;<br>
> ><br>
> > function init(){<br>
> > format = 'image/png';<br>
> ><br>
> > var bounds = new OpenLayers.Bounds(<br>
> > 497839.91636617144, 7649918.889418672,<br>
> > 499243.91636617144, 7650565.389418672<br>
> > );<br>
> ><br>
> > var options = {<br>
> > controls: [],<br>
> > maxExtent: bounds,<br>
> > maxResolution: 5.484375,<br>
> > projection: "EPSG:32723",<br>
> > units: 'm'<br>
> ><br>
> > };<br>
> ><br>
> > map = new OpenLayers.Map('map', options);<br>
> ><br>
> > // Layer QUADRA<br>
> > quadra = new OpenLayers.Layer.WMS(<br>
> > "Quadras", "<a href="http://localhost:8080/geoserver/wms" target="_blank">http://localhost:8080/geoserver/wms</a>",<br>
> > {<br>
> > layers: 'topp:quadra',<br>
> > transparent: "true",<br>
> > format: "image/png",<br>
> > srs: 'EPSG:32723',<br>
> > height: '345',<br>
> > width: '800',<br>
> > styles: '',<br>
> > tiled: 'true',<br>
> > tilesOrigin :<br>
> > "497839.91636617144,7649918.889418672"<br>
> > }<br>
> > );<br>
> ><br>
> > // Layer WFS<br>
> > wfs = new OpenLayers.Layer.WFS(<br>
> > "Quadras WFS",<br>
> > "<a href="http://localhost:8080/geoserver/wfs" target="_blank">http://localhost:8080/geoserver/wfs</a>",<br>
> > {typename: 'topp:quadra'},<br>
> > {<br>
> > typename: 'quadra',<br>
> > featureNS: '<a href="http://www.openplans.org/topp" target="_blank">http://www.openplans.org/topp</a>',<br>
> > extractAttributes: false<br>
> > }<br>
> > );<br>
> ><br>
> > //Layer IMAGEM<br>
> > imagem = new OpenLayers.Layer.WMS(<br>
> > "WorldView-1",<br>
> "<a href="http://localhost:8080/geoserver/wms" target="_blank">http://localhost:8080/geoserver/wms</a>",<br>
> > {<br>
> > layers: 'topp:lavras',<br>
> > srs: 'EPSG:32723',<br>
> > height: '345',<br>
> > width: '800',<br>
> > styles: '',<br>
> > format: format,<br>
> > tiled: 'true',<br>
> > tilesOrigin :<br>
> > "497839.91636617144,7649918.889418672"<br>
> > }<br>
> > );<br>
> ><br>
> ><br>
> > map.addLayers([quadra,wfs,imagem]);<br>
> ><br>
> > // build up all controls<br>
> > map.addControl(new OpenLayers.Control.PanZoomBar({<br>
> > position: new OpenLayers.Pixel(2, 15)<br>
> > }));<br>
> > map.addControl(new OpenLayers.Control.Navigation());<br>
> > map.addControl(new OpenLayers.Control.LayerSwitcher());<br>
> > map.zoomToExtent(bounds);<br>
> ><br>
> ><br>
> ><br>
> ><br>
> > }<br>
> ><br>
> ><br>
> > </script><br>
> > </head><br>
> > <body onload="init()"><br>
> ><br>
> > <div id="map"><br>
> > </div><br>
> ><br>
> > </body><br>
> > </html><br>
> ><br>
> ><br>
> > --<br>
> > Regards,<br>
> ><br>
> > Raphael Saldanha<br>
> > <a href="mailto:saldanha.plangeo@gmail.com">saldanha.plangeo@gmail.com</a><br>
> ><br>
><br>
><br>
><br>
> --<br>
> Atenciosamente,<br>
><br>
> Raphael Saldanha<br>
> <a href="mailto:saldanha.plangeo@gmail.com">saldanha.plangeo@gmail.com</a><br>
<br>
</div></div><font color="#888888">--<br>
Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: <a href="http://www.gmx.net/de/go/multimessenger01" target="_blank">http://www.gmx.net/de/go/multimessenger01</a><br>
</font></blockquote></div><br><br clear="all"><br>-- <br>Atenciosamente,<br><br>Raphael Saldanha<br><a href="mailto:saldanha.plangeo@gmail.com">saldanha.plangeo@gmail.com</a><br>