Files
openlayers/examples/worldwind.html
crschmidt 10907f2880 In order to make it more clear that users are required to have the theme/
directory to deploy when depending on features which use CSS, and make it clear
how to override the CSS in OpenLayers, include <link rel> ags in all examples.
(Closes #884)  


git-svn-id: http://svn.openlayers.org/trunk/openlayers@6145 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-08 22:19:28 +00:00

54 lines
2.1 KiB
HTML

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<style type="text/css">
#map {
width: 512px;
height: 512px;
border: 1px solid black;
}
</style>
<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://labs.metacarta.com/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">
</div>
<p id="shortdesc">
Shows the use of the Tiled WorldWind layers.
</p>
<div id="map"></div>
<div id="docs">
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.
</div>
</body>
</html>