Files
openlayers/examples/tilecache.html
crschmidt 7da6a3540e Merge the excellent documentation work done during foss4g into trunk. Many
thanks to all the contributors who helped put this together. 
I'm not exactly sure of what's going to happen with this, but for now,
at http://openlayers.org/dev/doc/examples.html you can see links to all the
examples *with descriptions*. Hooray!


git-svn-id: http://svn.openlayers.org/trunk/openlayers@5362 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-08 14:21:53 +00:00

53 lines
1.7 KiB
HTML

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>OpenLayers TileCache Example</title>
<style type="text/css">
#map {
width: 512px;
height: 512px;
}
</style>
<script src="../lib/OpenLayers.js"></script>
<script type="text/javascript">
var map, layer;
function init(){
map = new OpenLayers.Map( $('map'));
layer = new OpenLayers.Layer.TileCache("TileCache Layer",
["http://c0.labs.metacarta.com/wms-c/cache/",
"http://c1.labs.metacarta.com/wms-c/cache/",
"http://c2.labs.metacarta.com/wms-c/cache/",
"http://c3.labs.metacarta.com/wms-c/cache/",
"http://c4.labs.metacarta.com/wms-c/cache/"],
"basic", {'format': 'image/png'});
map.addLayer(layer);
map.setCenter(new OpenLayers.LonLat(0, 0), 0);
}
OpenLayers.Util.onImageLoadError = function() {
/**
* For images that don't exist in the cache, you can display
* a default image - one that looks like water for example.
* To show nothing at all, leave the following lines commented out.
*/
//this.src = "../img/blank.gif";
//this.style.display = "";
};
</script>
</head>
<body onload="init()">
<h1 id="title">TileCache Example</h1>
<div id="tags"></div>
<p id="shortdesc">
Demonstrates a TileCache layer that loads tiles from from a web accessible disk-based cache only.
</p>
<div id="map">
<div id="docs">
</div>
</body>
</html>