/[flash]/openlayers/tilecache.html
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /openlayers/tilecache.html

Parent Directory Parent Directory | Revision Log Revision Log


Revision 17 - (show annotations)
Sun Feb 24 12:30:19 2008 UTC (16 years, 2 months ago) by dpavlin
File MIME type: text/html
File size: 1677 byte(s)
experiment to display redered tiles using openlayers
1 <html xmlns="http://www.w3.org/1999/xhtml">
2 <head>
3 <title>OpenLayers using pre-generated pdf tiles</title>
4 <link rel="stylesheet" href="/rest/cvs/openlayers/theme/default/style.css" type="text/css" />
5 <style type="text/css">
6 #map {
7 width: 100%;
8 height: 99%;
9 border: 1px solid black;
10 }
11 body {
12 padding:0px;
13 margin:2px
14 }
15 #info {
16 position:absolute;
17 bottom:15px;
18 left:7px;
19 font-size:smaller;
20 z-index: 5000;
21 }
22 </style>
23 <script src="/rest/cvs/openlayers/lib/OpenLayers.js"></script>
24 <script type="text/javascript">
25 var map, layer;
26 function init(){
27 map = new OpenLayers.Map( $('map'));
28 layer = new OpenLayers.Layer.TileCache("TileCache Layer",
29 [
30 "tiles/"
31 ],
32 "basic",
33 {
34 'format': 'image/png',
35 maxResolution: 180/256 // same as the TileCache config
36 }
37 );
38 map.addLayer(layer);
39 map.setCenter(new OpenLayers.LonLat(0, 0), 0);
40 }
41
42 OpenLayers.Util.onImageLoadError = function() {
43 /**
44 * For images that don't exist in the cache, you can display
45 * a default image - one that looks like water for example.
46 * To show nothing at all, leave the following lines commented out.
47 */
48
49 //this.src = "../img/blank.gif";
50 //this.style.display = "";
51 };
52 </script>
53 </head>
54 <body onload="init()">
55 <div id="map"></div>
56 <div id="info">OpenLayers browsing local TileCache</div>
57 </body>
58 </html>

  ViewVC Help
Powered by ViewVC 1.1.26