[OpenLayers-Trac] Re: [OpenLayers] #3376: using WMS.Post transparency is not possible

OpenLayers trac-20090302 at openlayers.org
Mon Jun 20 18:14:41 EDT 2011


#3376: using WMS.Post transparency is not possible
------------------------+---------------------------------------------------
  Reporter:  h0nIg      |       Owner:  euzuro  
      Type:  bug        |      Status:  reopened
  Priority:  major      |   Milestone:          
 Component:  Layer.WMS  |     Version:  2.10    
Resolution:             |    Keywords:          
     State:             |  
------------------------+---------------------------------------------------

Comment(by ahocevar):

 The following works fine for me:
 {{{
 var map = new OpenLayers.Map( 'map' );
 var layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
         "http://vmap0.tiles.osgeo.org/wms/vmap0",
         {layers: 'basic'}
 );
 map.addLayer(layer);
 map.addLayer(new OpenLayers.Layer.WMS("Overlay",
     "http://suite.opengeo.org/geoserver/wms",
     {layers: "usa:states", transparent: true},
     {maxGetUrlLength: 0}))
 map.zoomToMaxExtent();
 }}}
 So there must be something wrong with your code. One thing that catches my
 eye is that several of your mapOptions are invalid, especially the
 maxExtent. You cannot transform (-180, -90, 180, 90) to EPSG:900913,
 because the latitudes are infinite.

 Also note that Layer.WMS.Post is deprecated. The above snippet is for
 2.11-rc1.

-- 
Ticket URL: <http://trac.openlayers.org/ticket/3376#comment:6>
OpenLayers <http://openlayers.org/>
A free AJAX map viewer


More information about the Trac mailing list