[OpenLayers-Users] Perhaps a UMN Question

Bartłomiej Burkot pomiarowiec10 at poczta.onet.pl
Mon Jun 14 09:18:42 EDT 2010


Hi
> var mapFile2 = "../htdocs/"+pfad+"/Maps/Hintergrund.map";
use absolute paths to mapfile (/var/htdocs/+pfad+..... ). Not relative.
Test Your WMS server in some WMS-client (e.g. QGIS) with this paths.
Bartek

> Hello list,
>
> I have a little question. Perhaps it is a UMN Mapserver Mapfile 
> question, but perhaps you can help me a little bit.
>
> I try to show a WMS layer in OpenLayers. For this I made a mapfile. In 
> this mapfile I realise a layer like this:
>
> LAYER
>     NAME 'symbol'
>     TYPE POLYGON
>
>     CONNECTIONTYPE postgis
>     CONNECTION 'host=*** user=*** password=*** dbname=***'
>     DATA 'the_geom FROM gines_geo_2007 using unique oid using srid 21781'
>
> METADATA
> "wms_title" "WMS symbol"
> END
>
> PROJECTION
> "init=epsg:21781"
> END
>
>     STATUS ON
>
>     CLASSITEM 'bfs'
>     CLASS
>       NAME ''
>       EXPRESSION ''
>       STYLE
>         SYMBOL 0
> SIZE 3
>                 COLOR 63 153 94
> OUTLINECOLOR 170 85 0
>        END
>     END
> END
>
> All other layers in this mapfile works, so I think the mapfile header 
> is correct.
>
> And now I try to test the layer in my OpenLayers. For this I try this:
>
> var urlArray =["http://***/cgi-bin/mapserv.exe?", 
> "_http://***/cgi-bin/mapserv.exe?_"];
> var mapFile2 = "../htdocs/"+pfad+"/Maps/Hintergrund.map";
>
> var symbolLayer = new OpenLayers.Layer.WMS("Symbollayer", urlArray, 
> {map:mapFile2, layers:"symbol", transparent:"true"},{singleTile: true, 
> ratio:1});
>
> symbolLayer.setIsBaseLayer(false);
> map.addLayer(symbolLayer);
>
> But I see nothing. In The Layerswitcher the layer is shown, but I see 
> no map. All other layers work, so that I think the extent and so on is 
> right. I think this is a UMN problem, but perhaps somebody has an idea 
> here? If I try to show the GetMap request directly in the Browser it 
> does'nt work, but I get no error message or message that something is 
> wrong.
>
> Hope that somebody can help me.
>
> Greetings
> Hanno
>
>
>
>
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>    

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100614/ef340448/attachment.html


More information about the Users mailing list