Riny
My feedback
1 result found
-
10 votes
An error occurred while saving the comment An error occurred while saving the comment Riny commentedThank you, that is a very nice and clean way of legend inclusion.
An error occurred while saving the comment Riny commentedWebmaster, thank you, I added the suggestions in a more or less working example: http://jsfiddle.net/EQk97/
An error occurred while saving the comment Riny commentedI mean http://jsfiddle.net/qevWk/
Riny shared this idea ·
To conclude: the minimal example at http://jsfiddle.net/dNz9W/4/ is working right.
There is one strange behavour in this setup that does not work well though:
When the SEDAC WMS layer is set to act as a transparent overlay by setting "isBaseLayer: false" there is only one tile showing up.
You can see this behaviour at : http://jsfiddle.net/yhEBN/1/embedded/result/
Is this sedac or openlayers related?
Thank you
------------
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);