Hi Arnd,<br><br>Thanks, but not works... and I<br><br><br><div class="gmail_quote">On Tue, Feb 17, 2009 at 2:25 PM, Arnd Wippermann <span dir="ltr"><<a href="mailto:arnd.wippermann@web.de">arnd.wippermann@web.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;">
<div><span>
<div dir="ltr" align="left"><font size="2" color="#0000ff" face="Arial"><span>Hi,</span></font></div>
<div dir="ltr" align="left"><span>
<div dir="ltr" align="left"><font size="2" color="#0000ff" face="Arial"></font> </div>
<div dir="ltr" align="left"><font face="Arial"><font color="#0000ff"><font size="2">for
local addresses you don't need a proxy host. To be sure, that your local address
is used I would use relative path<span>.</span></font></font></font></div>
<div dir="ltr" align="left"><font size="2" color="#0000ff" face="Arial"></font> </div></span></div>
<div dir="ltr" align="left"><font size="2" color="#0000ff" face="Arial"><span></span>OpenLayers.ProxyHost="/cgi-bin/proxy.cgi/?url="</font></div>
<div dir="ltr" align="left"><font color="#0000ff"><span></span></font> </div>
<div><font face="Arial"><font color="#0000ff"><font size="2">and you can
also <span>try t</span>o load your WFS<span> with relative path. Then the proxy script is not used.
Not 100% sure but only addresses, which begins with http , use the
proxy script.</span></font></font></font></div>
<div><font size="2" color="#0000ff" face="Arial"></font></div></span><font size="2" color="#0000ff" face="Arial"><span></span></font><font size="2" color="#0000ff" face="Arial"></font> </div>
<div dir="ltr" align="left"><font size="2" color="#0000ff" face="Arial"><div class="Ih2E3d">// Layer
WFS<br>
wfs = new
OpenLayers.Layer.WFS(<br>
"Quadras
WFS",<br></div><div class="Ih2E3d">
"/geoserver/wfs",<br>
{typename: 'topp:quadra'},</div></font></div><br>
<div dir="ltr" align="left" lang="de"><span><font size="2" color="#0000ff" face="Arial">If your WFS is
now loaded, then there seems something wrong with your proxy script or
configuration. If not loaded, copy the WFS request from firebug into the
address bar of your browser, to be sure that the request send a
valid response. </font></span></div>
<div dir="ltr" align="left" lang="de"><span><font size="2" color="#0000ff" face="Arial"></font></span><span><font size="2" color="#0000ff" face="Arial"></font></span> </div>
<div dir="ltr" align="left" lang="de"><span><font size="2" color="#0000ff" face="Arial">Arnd
Wippermann</font></span></div>
<div dir="ltr" align="left" lang="de"><span> </span></div>
<div dir="ltr" align="left" lang="de">
<hr>
</div>
<div dir="ltr" align="left" lang="de"><font size="2" face="Tahoma"><b>Von:</b> <a href="mailto:users-bounces@openlayers.org" target="_blank">users-bounces@openlayers.org</a>
[mailto:<a href="mailto:users-bounces@openlayers.org" target="_blank">users-bounces@openlayers.org</a>] <b>Im Auftrag von </b>Raphael
Saldanha<br><b>Gesendet:</b> Dienstag, 17. Februar 2009 02:10<br><b>An:</b>
<a href="mailto:users@openlayers.org" target="_blank">users@openlayers.org</a><br><b>Betreff:</b> [OpenLayers-Users] WFS
ProxyHost<br></font><br></div><div><div></div><div class="Wj3C7c">
<div></div>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, and add
the line "AddHandler python-cgi-script .cgi" on httpd.conf, as 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><span style="font-family: courier new,monospace;"><html></span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
<head></span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
<title>IPTU</title></span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
<link rel="stylesheet" type="text/css" href="<a href="http://localhost:8080/geoserver/openlayers/theme/default/style.css" target="_blank">http://localhost:8080/geoserver/openlayers/theme/default/style.css</a>"/></span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
<!-- Import OpenLayers, reduced, wms read only version --></span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
<script src="<a href="http://localhost:8080/geoserver/openlayers/OpenLayers.js" target="_blank">http://localhost:8080/geoserver/openlayers/OpenLayers.js</a>"
type="text/javascript"></script></span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
<script defer="defer" type="text/javascript"></span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
var map;</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
var quadra;</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
var imagem;</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
var wfs;</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
OpenLayers.ProxyHost="<a href="http://localhost:8080/cgi-bin/proxy.cgi/?url=" target="_blank">http://localhost:8080/cgi-bin/proxy.cgi/?url=</a>";</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">
// pink tile avoidance</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
OpenLayers.IMAGE_RELOAD_ATTEMPTS = 5;</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
// make OL compute scale according to WMS spec</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
OpenLayers.DOTS_PER_INCH = 25.4 / 0.28;</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
function init(){</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
format = 'image/png';</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
var bounds = new OpenLayers.Bounds(</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
497839.91636617144, 7649918.889418672,</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
499243.91636617144, 7650565.389418672</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
);</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
var options = {</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
controls: [],</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
maxExtent: bounds,</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
maxResolution: 5.484375,</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
projection: "EPSG:32723",</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
units: 'm'</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
};</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
map = new OpenLayers.Map('map', options);</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
// Layer QUADRA</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
quadra = new OpenLayers.Layer.WMS(</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
"Quadras", "<a href="http://localhost:8080/geoserver/wms" target="_blank">http://localhost:8080/geoserver/wms</a>",</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
{</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
layers: 'topp:quadra',</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
transparent: "true",</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
format: "image/png",</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
srs: 'EPSG:32723',</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
height: '345',</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
width: '800',</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
styles: '',</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
tiled: 'true',</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
tilesOrigin : "497839.91636617144,7649918.889418672"</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
}</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
);</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
// Layer WFS</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
wfs = new OpenLayers.Layer.WFS(</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
"Quadras WFS",</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
"<a href="http://localhost:8080/geoserver/wfs" target="_blank">http://localhost:8080/geoserver/wfs</a>",</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
{typename: 'topp:quadra'},</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
{</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
typename: 'quadra',</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
featureNS: '<a href="http://www.openplans.org/topp" target="_blank">http://www.openplans.org/topp</a>',</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
extractAttributes: false</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
}</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
);</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
//Layer IMAGEM</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
imagem = new OpenLayers.Layer.WMS(</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
"WorldView-1", "<a href="http://localhost:8080/geoserver/wms" target="_blank">http://localhost:8080/geoserver/wms</a>",</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
{</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
layers: 'topp:lavras',</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
srs: 'EPSG:32723',</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
height: '345',</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
width: '800',</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
styles: '',</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
format: format,</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
tiled: 'true',</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
tilesOrigin : "497839.91636617144,7649918.889418672"</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
}</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
);</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
map.addLayers([quadra,wfs,imagem]);</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
// build up all controls</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
map.addControl(new OpenLayers.Control.PanZoomBar({</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
position: new OpenLayers.Pixel(2, 15)</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
}));</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
map.addControl(new OpenLayers.Control.Navigation());</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
map.addControl(new OpenLayers.Control.LayerSwitcher());</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
map.zoomToExtent(bounds);</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
}</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
</script></span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
</head></span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> <body
onload="init()"></span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
<div id="map"></span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
</div></span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
</body></span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"></html></span><br><br clear="all"><br>-- <br>Regards,<br><br>Raphael Saldanha<br><a href="mailto:saldanha.plangeo@gmail.com" target="_blank">saldanha.plangeo@gmail.com</a><br>
</div></div></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>