git-svn-id: http://svn.openlayers.org/trunk/openlayers@3949 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
70 lines
2.5 KiB
HTML
70 lines
2.5 KiB
HTML
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<style type="text/css">
|
|
html, body {
|
|
height: 100%;
|
|
margin: 0;
|
|
padding: 0;
|
|
}
|
|
#map {
|
|
width: 100%;
|
|
height: 100%;
|
|
}
|
|
#title {
|
|
position: absolute;
|
|
left: 1em;
|
|
bottom: 1em;
|
|
z-index: 5000;
|
|
}
|
|
</style>
|
|
<script src="http://www.openlayers.org/api/OpenLayers.js"></script
|
|
<!--<script src="../lib/OpenLayers.js"></script>-->
|
|
<script type="text/javascript">
|
|
<!--
|
|
var map, layer;
|
|
function init(){
|
|
|
|
map = new OpenLayers.Map( $('map'), {maxExtent:new OpenLayers.Bounds(-122.6579,37.4901,-122.0738,37.8795), maxResolution:0.000634956337608418,0.000396847711005261,0.000238108626603157,0.000111117359081473,0.0000555586795407366,0.0000380973802565051,0.0000238108626603157,0.00000793695422010523]});
|
|
|
|
tcLayer = new OpenLayers.Layer.TileCache("TileCache Layer",
|
|
["http://web01.dmsolutions.ca/cache/",
|
|
"http://web02.dmsolutions.ca/cache/",
|
|
"http://web03.dmsolutions.ca/cache/",
|
|
"http://web04.dmsolutions.ca/cache/"],
|
|
"navteq-sample");
|
|
|
|
wmsLayer = new OpenLayers.Layer.WMS("WMS Layer", "http://sandbox01.dmsolutions.ca/tilecache/tilecache.cgi", {layers:"navteq-sample"});
|
|
tmsLayer = new OpenLayers.Layer.TMS("TMS Layer", "http://sandbox01.dmsolutions.ca/tilecache/tilecache.cgi/", {layername:"navteq-sample", type: 'png'});
|
|
|
|
map.addLayer(tcLayer);
|
|
map.addLayer(wmsLayer);
|
|
map.addLayer(tmsLayer);
|
|
|
|
map.addControl(new OpenLayers.Control.LayerSwitcher());
|
|
|
|
map.setCenter(new OpenLayers.LonLat(-122.3, 37.7), 1);
|
|
}
|
|
|
|
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()">
|
|
<div id="map">
|
|
<div id="title">
|
|
<b>OpenLayers (Read-Only) TileCache Example</b>
|
|
<br />from a web accessible disk-based cache only
|
|
</div>
|
|
</body>
|
|
</html>
|