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">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">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">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=">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">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">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">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">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">saldanha.plangeo@gmail.com</a><br>