Fixing image-layer example
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 19 KiB |
@@ -19,14 +19,12 @@
|
|||||||
function init(){
|
function init(){
|
||||||
map = new OpenLayers.Map('map');
|
map = new OpenLayers.Map('map');
|
||||||
|
|
||||||
var options = {numZoomLevels: 3};
|
|
||||||
|
|
||||||
var graphic = new OpenLayers.Layer.Image(
|
var graphic = new OpenLayers.Layer.Image(
|
||||||
'City Lights',
|
'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.Bounds(-180, -88.759, 180, 88.759),
|
||||||
new OpenLayers.Size(580, 288),
|
new OpenLayers.Size(580, 288),
|
||||||
options
|
{numZoomLevels: 3}
|
||||||
);
|
);
|
||||||
|
|
||||||
graphic.events.on({
|
graphic.events.on({
|
||||||
@@ -38,9 +36,12 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
var jpl_wms = new OpenLayers.Layer.WMS( "NASA Global Mosaic",
|
var jpl_wms = new OpenLayers.Layer.WMS(
|
||||||
"http://t1.hypercube.telascience.org/cgi-bin/landsat7",
|
"Global Imagery",
|
||||||
{layers: "landsat7"}, options);
|
"http://demo.opengeo.org/geoserver/wms",
|
||||||
|
{layers: "bluemarble"},
|
||||||
|
{maxExtent: [-160, -88.759, 160, 88.759], numZoomLevels: 3}
|
||||||
|
);
|
||||||
|
|
||||||
map.addLayers([graphic, jpl_wms]);
|
map.addLayers([graphic, jpl_wms]);
|
||||||
map.addControl(new OpenLayers.Control.LayerSwitcher());
|
map.addControl(new OpenLayers.Control.LayerSwitcher());
|
||||||
|
|||||||
Reference in New Issue
Block a user