]> dev.renevier.net Git - syp.git/blob - openlayers/examples/tilecache.html
when selecting a cluster, zoom until features are detached
[syp.git] / openlayers / examples / tilecache.html
1 <html xmlns="http://www.w3.org/1999/xhtml">
2   <head>
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">
8         var map, layer;
9         function init(){
10             map = new OpenLayers.Map( $('map'), {
11                 resolutions: [0.087890625, 0.0439453125, 0.02197265625, 0.010986328125]
12             });
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/"],
19                 "basic",
20                 {
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]
26                 }
27             );
28             map.addLayer(layer);
29             map.setCenter(new OpenLayers.LonLat(0, 0), 0);
30         }
31
32         OpenLayers.Util.onImageLoadError = function() {
33             /**
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.
37              */
38
39             //this.src = "../img/blank.gif";
40             //this.style.display = "";
41         };
42     </script>
43   </head>
44   <body onload="init()">
45       <h1 id="title">TileCache Example</h1>
46
47       <div id="tags"></div>
48
49       <p id="shortdesc">
50         Demonstrates a TileCache layer that loads tiles from from a web
51         accessible disk-based cache only.
52       </p>
53
54     <div id="map" class="smallmap"></div>
55
56     <div id="docs">
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.
61     </div>
62   </body>
63 </html>