1 <html xmlns="http://www.w3.org/1999/xhtml">
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">
9 map = new OpenLayers.Map('mapDiv', {maxResolution: 'auto'});
11 var single_default_effect = new OpenLayers.Layer.WMS(
12 "WMS untiled default",
13 "http://labs.metacarta.com/wms/vmap0?",
17 var single_resize_effect = new OpenLayers.Layer.WMS(
19 "http://labs.metacarta.com/wms/vmap0?",
21 {singleTile: true, transitionEffect: 'resize'}
23 var tiled_default_effect = new OpenLayers.Layer.WMS(
25 "http://labs.metacarta.com/wms/vmap0?",
28 var tiled_resize_effect = new OpenLayers.Layer.WMS(
30 "http://labs.metacarta.com/wms/vmap0?",
32 {transitionEffect: 'resize'}
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);
42 <body onload="init()">
43 <h1 id="title">Transition Example</h1>
45 Demonstrates the use of transition effects in tiled and untiled layers.
47 <div id="mapDiv" class="smallmap"></div>
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.
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>