~mortenoh/+junk/dhis2-detailed-import-export

« back to all changes in this revision

Viewing changes to gis/dhis-gis-geostat/mfbase/openlayers/examples/worldwind.html

  • Committer: larshelge at gmail
  • Date: 2009-03-03 16:46:36 UTC
  • Revision ID: larshelge@gmail.com-20090303164636-2sjlrquo7ib1gf7r
Initial check-in

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<html xmlns="http://www.w3.org/1999/xhtml">
 
2
  <head>
 
3
    <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
 
4
    <link rel="stylesheet" href="style.css" type="text/css" />
 
5
    <script src="../lib/OpenLayers.js"></script>
 
6
    <script type="text/javascript">
 
7
        var map, ol_wms, ww, ww2;
 
8
        function init(){
 
9
            map = new OpenLayers.Map('map', {'maxResolution': .28125, tileSize: new OpenLayers.Size(512, 512)});
 
10
 
 
11
            ol_wms = new OpenLayers.Layer.WMS( "OpenLayers WMS",
 
12
            "http://labs.metacarta.com/wms/vmap0?", {layers: 'basic'} );
 
13
 
 
14
            ww = new OpenLayers.Layer.WorldWind( "Bathy",
 
15
            "http://worldwind25.arc.nasa.gov/tile/tile.aspx?", 36, 4,
 
16
            {T:"bmng.topo.bathy.200406"});
 
17
            ww2 = new OpenLayers.Layer.WorldWind( "LANDSAT",
 
18
                "http://worldwind25.arc.nasa.gov/tile/tile.aspx", 2.25, 4,
 
19
                {T:"105"});
 
20
 
 
21
 
 
22
 
 
23
            map.addLayers([ol_wms, ww, ww2]);
 
24
            map.addControl(new OpenLayers.Control.LayerSwitcher());
 
25
            map.setCenter(new OpenLayers.LonLat(-71.4, 42.3), 6);
 
26
        }
 
27
    </script>
 
28
  </head>
 
29
  <body onload="init()">
 
30
        <h1 id="title">WorldWind layers Example</h1>
 
31
 
 
32
        <div id="tags">
 
33
        </div>
 
34
        <p id="shortdesc">
 
35
            Shows the use of the Tiled WorldWind layers.
 
36
        </p>
 
37
 
 
38
        <div id="map" class="smallmap"></div>
 
39
 
 
40
        <div id="docs">
 
41
            This is a demonstration of using Tiled WorldWind layers. WorldWind requires you to define a "LZTD" -- the 3rd param of the constructor -- and the number of zoom levels it supports. When a worldwind layer is not visible at a given tile level, and empty tile is placed there instead. Note that the maxResolution of the map times 512px, must be a multiple of a power of two different from the LZTD -- in this case, .28125 * 512 is 144, which is 36*4, and 2.25*64.
 
42
            This example has a 'Bathy' layer, visible as you zoom out, and a 'landsat' layer, visible as you zoom in, both visible at zoom level 6.
 
43
        </div>
 
44
      </body>
 
45
</html>
 
46
 
 
47