[mapserver-users] Problem with transparency overlays

Rafael chacón rafaelchacon at gmail.com
Thu Jan 29 07:17:29 PST 2009


Hi, I'm having some trouble with transparency layers appear/disappear. I'm
working with MapServer and Openlayers... I want two layers to overlay but
when I choose to show one the other one hides... Here is some  of my
code.... Thanks for the help :)

Mapserver File:

MAP
  size 800  600
  imagetype 'gif'
  TRANSPARENT ON
  imagecolor 0 0 255
  extent -180 -90 180 90
  SYMBOLSET "symbols"
  PROJECTION
    "init=epsg:4269"
  END

  WEB
    IMAGEPATH "/var/www/apache2-default/gis_tests/tmp/"
    IMAGEURL "/apache2-default/gis_tests/tmp/"
    TEMPLATE "empty.html"

    metadata
      wms_title "us_states"
      wms_srs "EPSG:4269"
    end
  end


_______

OPenlayers:

             layer = new OpenLayers.Layer.MapServer( "Estados unidos",
                      "
http://192.168.1.100/cgi-bin/mapserv?map=us_states.map",
                      {layers: 'us_states', 'format':'image/png'});
             roads = new OpenLayers.Layer.MapServer( "Roads",
                      "
http://192.168.1.100/cgi-bin/mapserv?map=us_states.map",
                      {layers: 'us_roads',transparent: 'true',
'format':'image/png'}, {isBaseLayer:false});
             gps = new OpenLayers.Layer.MapServer( "GPS",
                      "
http://192.168.1.100/cgi-bin/mapserv?map=us_states.map",
                      {layers: 'gps_points', transparent: 'true',
'format':'image/png' }, {isBaseLayer:false});

            roads.setVisibility(false);
            gps.setVisibility(false);


-- 
Rafael Chacon,

"El hombre es la medida de todas las cosas". Protagoras
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20090130/59d7c809/attachment.htm>


More information about the MapServer-users mailing list