1
<html xmlns="http://www.w3.org/1999/xhtml">
3
<title>OpenLayers Image Layer Example</title>
4
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
5
<link rel="stylesheet" href="style.css" type="text/css" />
6
<style type="text/css">
11
<script src="../lib/OpenLayers.js"></script>
12
<script type="text/javascript">
15
map = new OpenLayers.Map('map');
17
var options = {numZoomLevels: 3};
19
var graphic = new OpenLayers.Layer.Image(
21
'http://earthtrends.wri.org/images/maps/4_m_citylights_lg.gif',
22
new OpenLayers.Bounds(-180, -88.759, 180, 88.759),
23
new OpenLayers.Size(580, 288),
26
var jpl_wms = new OpenLayers.Layer.WMS( "NASA Global Mosaic",
27
"http://t1.hypercube.telascience.org/cgi-bin/landsat7",
28
{layers: "landsat7"}, options);
30
map.addLayers([graphic, jpl_wms]);
31
map.addControl(new OpenLayers.Control.LayerSwitcher());
32
map.zoomToMaxExtent();
36
<body onload="init()">
37
<h1 id="title">Image Layer Example</h1>
42
Demonstrate a single non-tiled image as a selectable base layer.
45
<div id="map" class="smallmap"></div>
49
The "City Lights" layer above is created from a single web accessible
50
image. If you construct it without any resolution related options,
51
the layer will be given a single resolution based on the extent/size.
52
Otherwise, it behaves much like a regular layer. This is primarily
53
intended to be used in an overview map - where another layer type
54
might not make a good overview.