Fixing image-layer example

This commit is contained in:
ahocevar
2012-10-13 09:26:45 +02:00
parent 583dc15700
commit e38ab01752
2 changed files with 8 additions and 7 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

View File

@@ -19,14 +19,12 @@
function init(){
map = new OpenLayers.Map('map');
var options = {numZoomLevels: 3};
var graphic = new OpenLayers.Layer.Image(
'City Lights',
'http://earthtrends.wri.org/images/maps/4_m_citylights_lg.gif',
'data/4_m_citylights_lg.gif',
new OpenLayers.Bounds(-180, -88.759, 180, 88.759),
new OpenLayers.Size(580, 288),
options
{numZoomLevels: 3}
);
graphic.events.on({
@@ -38,9 +36,12 @@
}
});
var jpl_wms = new OpenLayers.Layer.WMS( "NASA Global Mosaic",
"http://t1.hypercube.telascience.org/cgi-bin/landsat7",
{layers: "landsat7"}, options);
var jpl_wms = new OpenLayers.Layer.WMS(
"Global Imagery",
"http://demo.opengeo.org/geoserver/wms",
{layers: "bluemarble"},
{maxExtent: [-160, -88.759, 160, 88.759], numZoomLevels: 3}
);
map.addLayers([graphic, jpl_wms]);
map.addControl(new OpenLayers.Control.LayerSwitcher());