[OpenLayers-Commits] r10883 - trunk/openlayers/examples
commits-20090109 at openlayers.org
commits-20090109 at openlayers.org
Wed Nov 10 13:23:58 EST 2010
Author: tschaub
Date: 2010-11-10 10:23:58 -0800 (Wed, 10 Nov 2010)
New Revision: 10883
Added:
trunk/openlayers/examples/single-tile.html
trunk/openlayers/examples/single-tile.js
Removed:
trunk/openlayers/examples/notile.html
Log:
Updated single tile example.
Deleted: trunk/openlayers/examples/notile.html
===================================================================
--- trunk/openlayers/examples/notile.html 2010-11-10 09:17:32 UTC (rev 10882)
+++ trunk/openlayers/examples/notile.html 2010-11-10 18:23:58 UTC (rev 10883)
@@ -1,42 +0,0 @@
-<html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title>OpenLayers: Single Tile</title>
- <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
- <link rel="stylesheet" href="style.css" type="text/css" />
- <script src="../lib/OpenLayers.js"></script>
- <script type="text/javascript">
- var map;
- function init(){
- map = new OpenLayers.Map('mapDiv', {maxResolution: 'auto'});
-
- var old_ol_wms = new OpenLayers.Layer.WMS.Untiled( "WMS.Untiled",
- "http://vmap0.tiles.osgeo.org/wms/vmap0?", {layers: 'basic'} );
- old_ol_wms.addOptions({isBaseLayer: true});
-
- var new_ol_wms = new OpenLayers.Layer.WMS( "WMS w/singleTile",
- "http://vmap0.tiles.osgeo.org/wms/vmap0?", {layers: 'basic'},
- { singleTile: true, ratio: 1 } );
- new_ol_wms.addOptions({isBaseLayer: true});
-
- map.addLayers([old_ol_wms, new_ol_wms]);
- map.addControl(new OpenLayers.Control.LayerSwitcher());
- map.setCenter(new OpenLayers.LonLat(6.5, 40.5), 4);
- }
- </script>
- </head>
- <body onload="init()">
- <h1 id="title">Untiled Example</h1>
- <div id="tags">
- tile, ratio, singleTile, performance
- </div>
- <p id="shortdesc">
- Create an untiled WMS layer using the singleTile: true, option or the deprecated
- WMS.Untiled layer.
- </p>
- <div id="mapDiv" class="smallmap"></div>
- <p> The first layer is an old OpenLayers.Layer.WMS.Untiled layer, using
- a default ratio value of 1.5.
- <p> The second layer is an OpenLayers.Layer.WMS layer with singleTile set
- to true, and with a ratio of 1.
- </body>
-</html>
Copied: trunk/openlayers/examples/single-tile.html (from rev 10882, trunk/openlayers/examples/notile.html)
===================================================================
--- trunk/openlayers/examples/single-tile.html (rev 0)
+++ trunk/openlayers/examples/single-tile.html 2010-11-10 18:23:58 UTC (rev 10883)
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>OpenLayers: Single Tile</title>
+ <link rel="stylesheet" href="../theme/default/style.css" type="text/css">
+ <link rel="stylesheet" href="style.css" type="text/css">
+ </head>
+ <body>
+ <h1 id="title">Single Tile Example</h1>
+ <div id="tags">tile, ratio, singleTile, performance</div>
+ <p id="shortdesc">
+ Use the singleTile option on gridded layers to request a single tile.
+ </p>
+ <div id="mapDiv" class="smallmap"></div>
+ <div id="docs">
+ <p>
+ This map demonstrates the use of the singleTile property as an
+ alternative to the default tiled behavior of layers. The first
+ layer in the map is a WMS layer with the singleTile option set
+ true. The second layer is a WMS layer with the default options.
+ </p>
+ <p>
+ View the <a href="single-tile.js" target="_blank">single-tile.js</a>
+ source to see how this is done.
+ </p>
+ </div>
+ <script src="../lib/OpenLayers.js"></script>
+ <script src="single-tile.js"></script>
+ </body>
+</html>
Added: trunk/openlayers/examples/single-tile.js
===================================================================
--- trunk/openlayers/examples/single-tile.js (rev 0)
+++ trunk/openlayers/examples/single-tile.js 2010-11-10 18:23:58 UTC (rev 10883)
@@ -0,0 +1,20 @@
+var map = new OpenLayers.Map({
+ div: "mapDiv",
+ layers: [
+ new OpenLayers.Layer.WMS(
+ "Single Tile",
+ "http://vmap0.tiles.osgeo.org/wms/vmap0",
+ {layers: "basic"},
+ {singleTile: true, ratio: 1}
+ ),
+ new OpenLayers.Layer.WMS(
+ "Multiple Tiles",
+ "http://vmap0.tiles.osgeo.org/wms/vmap0",
+ {layers: "basic"}
+ )
+ ],
+ center: new OpenLayers.LonLat(6.5, 40.5),
+ zoom: 4
+});
+
+map.addControl(new OpenLayers.Control.LayerSwitcher());
More information about the Commits
mailing list