[OpenLayers-Commits] r4742 - sandbox/pagameba/transition/examples

commits at openlayers.org commits at openlayers.org
Mon Oct 1 17:00:20 EDT 2007


Author: pagameba
Date: 2007-10-01 17:00:18 -0400 (Mon, 01 Oct 2007)
New Revision: 4742

Added:
   sandbox/pagameba/transition/examples/transition.html
Log:
example page with various combinations of resize effects

Added: sandbox/pagameba/transition/examples/transition.html
===================================================================
--- sandbox/pagameba/transition/examples/transition.html	                        (rev 0)
+++ sandbox/pagameba/transition/examples/transition.html	2007-10-01 21:00:18 UTC (rev 4742)
@@ -0,0 +1,54 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <style type="text/css">
+        #mapDiv {
+            width: 400px;
+            height: 400px;
+            border: 1px solid black;
+        }
+    </style>
+    <script src="../lib/OpenLayers.js"></script>
+    <script type="text/javascript">
+        var map;
+        function init(){
+            map = new OpenLayers.Map('mapDiv', {maxResolution: 'auto'});
+
+            var single_default_effect = new OpenLayers.Layer.WMS( "WMS untiled default", 
+                "http://labs.metacarta.com/wms/vmap0?", {layers: 'basic'}, 
+                { singleTile: true, isBaseLayer: true} );
+            var single_resize_effect = new OpenLayers.Layer.WMS( "WMS untiled resize", 
+                "http://labs.metacarta.com/wms/vmap0?", {layers: 'basic'}, 
+                { singleTile: true, isBaseLayer: true, transitionEffect: 'resize'} );
+            var single_animate_effect = new OpenLayers.Layer.WMS( "WMS untiled animate", 
+                "http://labs.metacarta.com/wms/vmap0?", {layers: 'basic'}, 
+                { singleTile: true, isBaseLayer: true, transitionEffect: 'animate'} );
+            var tiled_default_effect = new OpenLayers.Layer.WMS( "WMS tiled default ", 
+                "http://labs.metacarta.com/wms/vmap0?", {layers: 'basic'}, 
+                { isBaseLayer: true} );
+            var tiled_resize_effect = new OpenLayers.Layer.WMS( "WMS tiled resize", 
+                "http://labs.metacarta.com/wms/vmap0?", {layers: 'basic'}, 
+                { isBaseLayer: true, transitionEffect: 'resize'} );
+            var tiled_animate_effect = new OpenLayers.Layer.WMS( "WMS tiled animate", 
+                "http://labs.metacarta.com/wms/vmap0?", {layers: 'basic'}, 
+                { isBaseLayer: true, transitionEffect: 'animate'} );
+
+            map.addLayers([single_default_effect, single_resize_effect, single_animate_effect,
+                           tiled_default_effect, tiled_resize_effect, tiled_animate_effect]);
+            map.addControl(new OpenLayers.Control.LayerSwitcher());
+            map.setCenter(new OpenLayers.LonLat(6.5, 40.5), 4);
+        }
+    </script>
+  </head>
+  <body onload="init()">
+    <h1 id="title">Transition Example</h1>
+    <p id="shortdesc">
+      Demonstrates the use of transition effects in tiled and untiled layers.  There are three transitions that are currently implemented, 'default', 'resize', and 'animate'.  The default transition effect is used when no transition is specified and is implemented as no transition effect except for panning singleTile layers.  The 'resize' effect resamples the current tile and displays it stretched or compressed until the new tile is available.  The 'animate' effect does the same thing as 'resize', but in several steps.</p>  
+    <div id="mapDiv"></div>
+    <p> The first layer is an untiled WMS layer with no transition effect. </p>
+    <p> The first layer is an untiled WMS layer with a 'resize' effect. </p>
+    <p> The first layer is an untiled WMS layer with an 'animate' effect. </p>
+    <p> The fourth layer is a tiled WMS layer with no transition effect. </p>
+    <p> The fifth layer is a tiled WMS layer with a 'resize' effect. </p>
+    <p> The sixth layer is a tiled WMS layer with an 'animate' effect. </p>
+  </body>
+</html>



More information about the Commits mailing list