1 | <!DOCTYPE html> |
---|
2 | <html> |
---|
3 | <head> |
---|
4 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
---|
5 | <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"> |
---|
6 | <meta name="apple-mobile-web-app-capable" content="yes"> |
---|
7 | <title>OpenLayers Transitions Example</title> |
---|
8 | <link rel="stylesheet" href="style.css" type="text/css"> |
---|
9 | <script src="../lib/OpenLayers.js"></script> |
---|
10 | <script type="text/javascript"> |
---|
11 | var map; |
---|
12 | function init(){ |
---|
13 | map = new OpenLayers.Map('mapDiv', {maxResolution: 'auto'}); |
---|
14 | |
---|
15 | var single_default_effect = new OpenLayers.Layer.WMS( |
---|
16 | "WMS untiled default", |
---|
17 | "http://vmap0.tiles.osgeo.org/wms/vmap0?", |
---|
18 | {layers: 'basic'}, |
---|
19 | {singleTile: true} |
---|
20 | ); |
---|
21 | var single_resize_effect = new OpenLayers.Layer.WMS( |
---|
22 | "WMS untiled resize", |
---|
23 | "http://vmap0.tiles.osgeo.org/wms/vmap0?", |
---|
24 | {layers: 'basic'}, |
---|
25 | {singleTile: true, transitionEffect: 'resize'} |
---|
26 | ); |
---|
27 | var tiled_default_effect = new OpenLayers.Layer.WMS( |
---|
28 | "WMS tiled default ", |
---|
29 | "http://vmap0.tiles.osgeo.org/wms/vmap0?", |
---|
30 | {layers: 'basic'} |
---|
31 | ); |
---|
32 | var tiled_resize_effect = new OpenLayers.Layer.WMS( |
---|
33 | "WMS tiled resize", |
---|
34 | "http://vmap0.tiles.osgeo.org/wms/vmap0?", |
---|
35 | {layers: 'basic'}, |
---|
36 | {transitionEffect: 'resize'} |
---|
37 | ); |
---|
38 | |
---|
39 | map.addLayers([single_default_effect, single_resize_effect, |
---|
40 | tiled_default_effect, tiled_resize_effect]); |
---|
41 | map.addControl(new OpenLayers.Control.LayerSwitcher()); |
---|
42 | map.setCenter(new OpenLayers.LonLat(6.5, 40.5), 4); |
---|
43 | } |
---|
44 | </script> |
---|
45 | </head> |
---|
46 | <body onload="init()"> |
---|
47 | <h1 id="title">Transition Example</h1> |
---|
48 | <div id="tags"> |
---|
49 | transition, resize, tile, singletile, light |
---|
50 | </div> |
---|
51 | <p id="shortdesc"> |
---|
52 | Demonstrates the use of transition effects in tiled and untiled layers. |
---|
53 | </p> |
---|
54 | <div id="mapDiv" class="smallmap"></div> |
---|
55 | <div id="docs"> |
---|
56 | There are two transitions that are currently implemented: null (the |
---|
57 | default) and 'resize'. The default transition effect is used when no |
---|
58 | transition is specified and is implemented as no transition effect except |
---|
59 | for panning singleTile layers. The 'resize' effect resamples the current |
---|
60 | tile and displays it stretched or compressed until the new tile is available. |
---|
61 | <ul> |
---|
62 | <li>The first layer is an untiled WMS layer with no transition effect.</li> |
---|
63 | <li>The second layer is an untiled WMS layer with a 'resize' effect. </li> |
---|
64 | <li>The third layer is a tiled WMS layer with no transition effect. </li> |
---|
65 | <li>The fourth layer is a tiled WMS layer with a 'resize' effect. </li> |
---|
66 | </ul> |
---|
67 | </div> |
---|
68 | </body> |
---|
69 | </body> |
---|
70 | </html> |
---|