File: worldwind.html

package info (click to toggle)
openlayers 2.11%2Bds1-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, wheezy
  • size: 60,144 kB
  • ctags: 10,906
  • sloc: xml: 7,435; python: 778; sh: 68; makefile: 30
file content (60 lines) | stat: -rw-r--r-- 2,445 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <link rel="stylesheet" href="../theme/default/style.css" type="text/css">
    <link rel="stylesheet" href="style.css" type="text/css">
    <script src="../lib/OpenLayers.js"></script>
    <script type="text/javascript">
        var map, ol_wms, ww, ww2;
        function init(){
            map = new OpenLayers.Map('map', {'maxResolution': .28125, tileSize: new OpenLayers.Size(512, 512)});

            ol_wms = new OpenLayers.Layer.WMS( "OpenLayers WMS",
            "http://vmap0.tiles.osgeo.org/wms/vmap0?", {layers: 'basic'} );

            ww = new OpenLayers.Layer.WorldWind( "Bathy",
            "http://worldwind25.arc.nasa.gov/tile/tile.aspx?", 36, 4,
            {T:"bmng.topo.bathy.200406"});
            ww2 = new OpenLayers.Layer.WorldWind( "LANDSAT",
                "http://worldwind25.arc.nasa.gov/tile/tile.aspx", 2.25, 4,
                {T:"105"});



            map.addLayers([ol_wms, ww, ww2]);
            map.addControl(new OpenLayers.Control.LayerSwitcher());
            map.setCenter(new OpenLayers.LonLat(-71.4, 42.3), 6);
        }
    </script>
  </head>
  <body onload="init()">
        <h1 id="title">WorldWind layers Example</h1>

        <div id="tags">
            worldwind, tile
        </div>
        <p id="shortdesc">
            Shows the use of the Tiled WorldWind layers.
        </p>

        <div id="map" class="smallmap"></div>

        <div id="docs">
            <p>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. 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.</p>
        </div>
      </body>
</html>