[OpenLayers-Users] Perhaps a UMN Question

Rahn Hanno (rahn) rahn at zhaw.ch
Mon Jun 14 05:39:28 EDT 2010


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 


 
 

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


More information about the Users mailing list