[OpenLayers-Users] WFS layers loaded are not visible

Alessio Di Lorenzo alessio.dilorenzo at gmail.com
Fri Feb 29 13:02:01 EST 2008


I'm still fighting against this problem... but without any success.
Suggestions will be very appreciated!

thx :)



Alessio Di Lorenzo ha scritto:
> Hi list,
>
> I have a problem with openlayers 2.5 and WFS layers generated from 
> umn-mapserver.
>
> The WFS service is running and serving the layers properly (I tested 
> it with qgis and udig) but when I try to load the wfs layer in my OL 
> application, even if it doesn't give errors, it is "invisible". I can 
> see only the layer title inside the switcher...
> Where is the problem?
>
> I copied the proxy.cgi python script from the OL example directory to 
> the /usr/lib/cgi-bin/ directory (I'm using apache2 with the mod_python 
> under ubuntu 7.10) and when I type the url 
> http://localhost/cgi-bin/proxy.cgi in firefox it opens the openlayers 
> homepage. So I suppose that my proxy is configured properly.
>
> This is my OL script code:
>
> <script type="text/Javascript">
>    var map;
>
>    function init(){
>            OpenLayers.ProxyHost="/cgi-bin/proxy.cgi/?url= ";
>
>        var bounds  =  new OpenLayers.Bounds(
>            396832.88592716516, 4624189.584054877,
>                    447059.93946227664, 4690229.517719225
>            ); //minX,minY,maxX,maxY values
>
>        var options = {
>            //controls: [],
>            maxExtent:bounds,
>            maxResolution: 'auto',
>            projection: "EPSG:32633",
>            units:'m'
>        }
>               map = new OpenLayers.Map('map', options);
>               var comuni = new OpenLayers.Layer.WFS(
>            "Comuni",
>                 
> "http://localhost/cgi-bin/mapserv?map=/var/www/wfs/wfs.map&",
>            {
>                typename:'comuni',
>                extractAtrributes:true
>            },{ isBaseLayer:true }
>           );
>        map.addLayer(comuni);
>
>    map.zoomToExtent(bounds);
>          map.addControl( new OpenLayers.Control.KeyboardDefaults());
>          map.addControl( new OpenLayers.Control.LayerSwitcher() );
>          map.addControl( new OpenLayers.Control.MousePosition ({div: 
> $('mapinfo')}) );
> </script>
>
> thx in advance for your help
>
> alessio
>




More information about the Users mailing list