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/Firebug/firebug.js"></script>
12 <script src="../lib/OpenLayers.js"></script>
13 <script type="text/javascript">
16 map = new OpenLayers.Map('map');
18 var options = {numZoomLevels: 3};
20 var graphic = new OpenLayers.Layer.Image(
22 'http://earthtrends.wri.org/images/maps/4_m_citylights_lg.gif',
23 new OpenLayers.Bounds(-180, -88.759, 180, 88.759),
24 new OpenLayers.Size(580, 288),
29 loadstart: function() {
30 OpenLayers.Console.log("loadstart");
33 OpenLayers.Console.log("loadend");
37 var jpl_wms = new OpenLayers.Layer.WMS( "NASA Global Mosaic",
38 "http://t1.hypercube.telascience.org/cgi-bin/landsat7",
39 {layers: "landsat7"}, options);
41 map.addLayers([graphic, jpl_wms]);
42 map.addControl(new OpenLayers.Control.LayerSwitcher());
43 map.zoomToMaxExtent();
47 <body onload="init()">
48 <h1 id="title">Image Layer Example</h1>
53 Demonstrate a single non-tiled image as a selectable base layer.
56 <div id="map" class="smallmap"></div>
60 The "City Lights" layer above is created from a single web accessible
61 image. If you construct it without any resolution related options,
62 the layer will be given a single resolution based on the extent/size.
63 Otherwise, it behaves much like a regular layer. This is primarily
64 intended to be used in an overview map - where another layer type
65 might not make a good overview.