]> dev.renevier.net Git - syp.git/blob - openlayers/examples/transition.html
initial commit
[syp.git] / openlayers / examples / transition.html
1 <html xmlns="http://www.w3.org/1999/xhtml">
2   <head>
3     <title>OpenLayers Transitions Example</title>
4     <link rel="stylesheet" href="style.css" type="text/css" />
5     <script src="../lib/OpenLayers.js"></script>
6     <script type="text/javascript">
7         var map;
8         function init(){
9             map = new OpenLayers.Map('mapDiv', {maxResolution: 'auto'});
10
11             var single_default_effect = new OpenLayers.Layer.WMS(
12                 "WMS untiled default", 
13                 "http://labs.metacarta.com/wms/vmap0?",
14                 {layers: 'basic'}, 
15                 {singleTile: true}
16             );
17             var single_resize_effect = new OpenLayers.Layer.WMS(
18                 "WMS untiled resize", 
19                 "http://labs.metacarta.com/wms/vmap0?",
20                 {layers: 'basic'}, 
21                 {singleTile: true, transitionEffect: 'resize'}
22             );
23             var tiled_default_effect = new OpenLayers.Layer.WMS(
24                 "WMS tiled default ", 
25                 "http://labs.metacarta.com/wms/vmap0?",
26                 {layers: 'basic'}
27             );
28             var tiled_resize_effect = new OpenLayers.Layer.WMS(
29                 "WMS tiled resize", 
30                 "http://labs.metacarta.com/wms/vmap0?",
31                 {layers: 'basic'}, 
32                 {transitionEffect: 'resize'}
33             );
34
35             map.addLayers([single_default_effect, single_resize_effect,
36                            tiled_default_effect, tiled_resize_effect]);
37             map.addControl(new OpenLayers.Control.LayerSwitcher());
38             map.setCenter(new OpenLayers.LonLat(6.5, 40.5), 4);
39         }
40     </script>
41   </head>
42   <body onload="init()">
43     <h1 id="title">Transition Example</h1>
44     <p id="shortdesc">
45         Demonstrates the use of transition effects in tiled and untiled layers.
46     </p>
47     <div id="mapDiv" class="smallmap"></div>
48     <div id="docs">
49         There are two transitions that are currently implemented: null (the
50         default) and 'resize'.  The default transition effect is used when no
51         transition is specified and is implemented as no transition effect except
52         for panning singleTile layers.  The 'resize' effect resamples the current
53         tile and displays it stretched or compressed until the new tile is available.
54     <ul>
55         <li>The first layer is an untiled WMS layer with no transition effect.</li>
56         <li>The second layer is an untiled WMS layer with a 'resize' effect. </li>
57         <li>The third layer is a tiled WMS layer with no transition effect. </li>
58         <li>The fourth layer is a tiled WMS layer with a 'resize' effect. </li>
59     </ul>
60     </div>
61   </body>
62   </body>
63 </html>