1 <html xmlns="http://www.w3.org/1999/xhtml">
3 <title>OpenLayers TileCache 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 <script src="../lib/OpenLayers.js"></script>
7 <script type="text/javascript">
10 map = new OpenLayers.Map( $('map'), {
11 resolutions: [0.087890625, 0.0439453125, 0.02197265625, 0.010986328125]
13 layer = new OpenLayers.Layer.TileCache("TileCache Layer",
14 ["http://c0.labs.metacarta.com/wms-c/cache/",
15 "http://c1.labs.metacarta.com/wms-c/cache/",
16 "http://c2.labs.metacarta.com/wms-c/cache/",
17 "http://c3.labs.metacarta.com/wms-c/cache/",
18 "http://c4.labs.metacarta.com/wms-c/cache/"],
21 serverResolutions: [0.703125, 0.3515625, 0.17578125, 0.087890625,
22 0.0439453125, 0.02197265625, 0.010986328125,
23 0.0054931640625, 0.00274658203125, 0.001373291015625,
24 0.0006866455078125, 0.00034332275390625, 0.000171661376953125,
25 0.0000858306884765625, 0.00004291534423828125, 0.000021457672119140625]
29 map.setCenter(new OpenLayers.LonLat(0, 0), 0);
32 OpenLayers.Util.onImageLoadError = function() {
34 * For images that don't exist in the cache, you can display
35 * a default image - one that looks like water for example.
36 * To show nothing at all, leave the following lines commented out.
39 //this.src = "../img/blank.gif";
40 //this.style.display = "";
44 <body onload="init()">
45 <h1 id="title">TileCache Example</h1>
50 Demonstrates a TileCache layer that loads tiles from from a web
51 accessible disk-based cache only.
54 <div id="map" class="smallmap"></div>
57 This layer should be used for web accessible disk-based caches only.
58 It is not used to request new tiles from TileCache. Note that you
59 should specify resolutions explicitly on this layer so that they match
60 your TileCache configuration.