[OpenLayers-Users] setting isBaseLayer to false cripples overlay.

Daniel Behr daniel.behr at hzg.de
Wed Jun 6 01:56:49 PDT 2012


I think you want the overlay on the whole map like this:

http://jsfiddle.net/yhEBN/16/

Am 06.06.2012 10:45, schrieb Daniel Behr:
> and you should include 'transparent' instead of 'transparency'
>
> Am 06.06.2012 10:30, schrieb [Elydian] Riny Heijdendael:
>> Hi there,
>>
>> I made a small map, that displays a WMS layer correct if it is a
>> baselayer, but
>> is crippled when baselayer is set to false.
>>
>> You can see example at http://jsfiddle.net/yhEBN/1/light/
>>
>> Does anyone know why this fails?
>>
>> Thank you,
>>
>> Riny
>> ------------
>> var map = new OpenLayers.Map("map");
>> var osm = new OpenLayers.Layer.OSM("OpenStreetMap");
>>
>> var sedac = new OpenLayers.Layer.WMS("Population Density",
>> "http://sedac.ciesin.columbia.edu/geoserver/ows", {
>> layers: 'gpw-v3:gpw-v3-population-density_2000',
>> transparency : true
>> },{
>> opacity: 0.5,
>> _*isBaseLayer: false,*_
>> });
>>
>> map.addLayer(osm);
>> map.addLayer(sedac);
>> map.addControl(new OpenLayers.Control.LayerSwitcher());
>> map.setCenter(new OpenLayers.LonLat(0, 0), 2);
>>
>>
>> _______________________________________________
>> Users mailing list
>> Users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/openlayers-users
> Helmholtz-Zentrum Geesthacht Zentrum für Material- und Küstenforschung
> GmbH Max-Planck-Straße 1 I 21502 Geesthacht I Deutschland/Germany
> Geschäftsführer/Board of Management: Prof. Dr. Wolfgang Kaysser,
> Dipl.-Ing. Michael Ganß Vorsitzender des Aufsichtsrates/Chairman of the
> Supervisory Board: MinDirig Wilfried Kraus Amtsgericht Lübeck HRB 285 GE
> (Register Court) Internet: http://www.hzg.de
> _______________________________________________
> Users mailing list
> Users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/openlayers-users
Helmholtz-Zentrum Geesthacht 
Zentrum für Material- und Küstenforschung GmbH 
Max-Planck-Straße 1 I 21502 Geesthacht I Deutschland/Germany 

Geschäftsführer/Board of Management: Prof. Dr. Wolfgang Kaysser, Dipl.-Ing. Michael Ganß 
Vorsitzender des Aufsichtsrates/Chairman of the Supervisory Board: MinDirig Wilfried Kraus 
Amtsgericht Lübeck HRB 285 GE (Register Court) 
Internet: http://www.hzg.de  


More information about the Users mailing list