[mapserver-users] WMS + Layers with OPACITY

Juan Felipe Alvarez Saldarriaga jfalvarez at vesifront.org
Mon Jun 1 20:56:10 PDT 2009


Hey, I'm trying to use a WMS map from the NASA as myy BASE map and som
other layers (SHP), but I don't know why the image looks so ugly, I'm
using OpenLayers to render the map and mapserver on Ubuntu, I set the
WMS as png and the other layers too, can somebody help me with this?,
the map and the image are attached, Thx.

This is the mapserver config:

MapServer version 5.4.0 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP OUTPUT=SVG
 SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=WMS_SERVER
 SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER
 SUPPORTS=FASTCGI SUPPORTS=THREADS SUPPORTS=GEOS INPUT=EPPL7 INPUT=POSTGIS INPUT
=OGR INPUT=GDAL INPUT=SHAPEFILE

My OpenLayers config:

	function showMap()
	{
		objOpenLayers = new OpenLayers.Map( "show-map", { controls: [], /*
zoom: 5 */ maxResolution: 'auto' } );

		objOpenLayers.addControl( new OpenLayers.Control.PanZoomBar() );
		objOpenLayers.addControl( new OpenLayers.Control.MouseToolbar() );
		objOpenLayers.addControl( new OpenLayers.Control.LayerSwitcher() );
		// objOpenLayers.addControl( new OpenLayers.Control.Permalink() );
		// objOpenLayers.addControl( new OpenLayers.Control.ScaleLine() );
		// objOpenLayers.addControl( new OpenLayers.Control.Permalink(
'permalink' ) );
		objOpenLayers.addControl( new OpenLayers.Control.MousePosition() );
		// objOpenLayers.addControl( new OpenLayers.Control.OverviewMap() );
		objOpenLayers.addControl( new OpenLayers.Control.KeyboardDefaults() );

    var twms = new OpenLayers.Layer.WMS( "NASA",
        "http://wms.jpl.nasa.gov/wms.cgi?",
        { map: '/home/jfalvarez/projects/cms/branches/V1/docroot/map-files/9182340517c2d323061dc1cffea6e431.map',
          layers: 'BMNG',
          format: 'image/png'}, {isBaseLayer: true} );
    objOpenLayers.addLayer(twms);

var objMapServer17 = new OpenLayers.Layer.MapServer(
			"Colombia Departamentos",
			"http://vesifront.org/cgi-bin/mapserv",
			{
				map: "/home/jfalvarez/projects/cms/branches/V1/docroot/map-files/9182340517c2d323061dc1cffea6e431.map",
				layers: "Colombia_Departamentos",
				// maxResolution: "auto",
				transparent: "true",
				format: "image/png"
							}
		);
		objOpenLayers.addLayer( objMapServer17 );

					var objMapServer18 = new OpenLayers.Layer.MapServer(
			"Zona Bananera 2",
			"http://vesifront.org/cgi-bin/mapserv",
			{
				map: "/home/jfalvarez/projects/cms/branches/V1/docroot/map-files/9182340517c2d323061dc1cffea6e431.map",
				layers: "Zona_Bananera_2",
				// maxResolution: "auto",
				transparent: "true",
				format: "image/png"
							}
		);

		objOpenLayers.addLayer( objMapServer18 );

					var objMapServer19 = new OpenLayers.Layer.MapServer(
			"Zona Bananera 1",
			"http://vesifront.org/cgi-bin/mapserv",
			{
				map: "/home/jfalvarez/projects/cms/branches/V1/docroot/map-files/9182340517c2d323061dc1cffea6e431.map",
				layers: "Zona_Bananera_1",
				// maxResolution: "auto",
				transparent: "true",
				format: "image/png"
							}
		);

		if ( !objOpenLayers.getCenter() )
		{
			objOpenLayers.zoomToMaxExtent();
		}
	}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 9182340517c2d323061dc1cffea6e431.map
Type: application/octet-stream
Size: 5226 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20090601/e44a3b54/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mapserver-ugly-layers.JPG
Type: image/jpeg
Size: 179802 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20090601/e44a3b54/attachment.jpe>


More information about the MapServer-users mailing list