[OpenLayers-Users] WFS layers loaded are not visible

Arnd Wippermann arnd.wippermann at web.de
Fri Feb 29 13:48:42 EST 2008


Hi Alessio,

What browser do you work with? I have had the problem with IE. In Firefox
the WFS from UMN MapServer and also an own KML would be loaded and could be
seen, but not in IE6. The layer would be displayed in the layerswitcher,
that was all. From Firebug I grabbed the request and put it in IE6. There I
get the message, that the xml had wrong characters. I solved the problem,
that I set in my proxy-script

Response.ContentType = "text/xml"
Response.CharSet = "iso-8859-1"

It helped, because both WFS and my own build KML came with "iso-8859-1". I
use also OL 2.5.

Mit freundlichen Grüssen

Arnd Wippermann
http://gis.ibbeck.de/ginfo/





-----Ursprüngliche Nachricht-----
Von: users-bounces at openlayers.org [mailto:users-bounces at openlayers.org] Im
Auftrag von Alessio Di Lorenzo
Gesendet: Freitag, 29. Februar 2008 19:02
An: OpenLayers ML
Betreff: Re: [OpenLayers-Users] WFS layers loaded are not visible

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
>

_______________________________________________
Users mailing list
Users at openlayers.org
http://openlayers.org/mailman/listinfo/users




More information about the Users mailing list