OpenLayers OpenLayers

Changeset 6372

Show
Ignore:
Timestamp:
02/25/08 22:18:20 (11 months ago)
Author:
crschmidt
Message:

example had multiple copies of itself. fix.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • sandbox/crschmidt/demo/examples/transition.html

    r6371 r6372  
    4545  </body> 
    4646</html> 
    47 <html xmlns="http://www.w3.org/1999/xhtml"> 
    48   <head> 
    49     <style type="text/css"> 
    50         #mapDiv { 
    51             width: 400px; 
    52             height: 400px; 
    53             border: 1px solid black; 
    54         } 
    55     </style> 
    56     <script src="../lib/OpenLayers.js"></script> 
    57     <script type="text/javascript"> 
    58         var map; 
    59         function init(){ 
    60             map = new OpenLayers.Map('mapDiv', {maxResolution: 'auto'}); 
    61  
    62             var single_default_effect = new OpenLayers.Layer.WMS( "WMS untiled default",  
    63                 "http://labs.metacarta.com/wms/vmap0?", {layers: 'basic'},  
    64                 { singleTile: true, isBaseLayer: true} ); 
    65             var single_resize_effect = new OpenLayers.Layer.WMS( "WMS untiled resize",  
    66                 "http://labs.metacarta.com/wms/vmap0?", {layers: 'basic'},  
    67                 { singleTile: true, isBaseLayer: true, transitionEffect: 'resize'} ); 
    68             var tiled_default_effect = new OpenLayers.Layer.WMS( "WMS tiled default ",  
    69                 "http://labs.metacarta.com/wms/vmap0?", {layers: 'basic'},  
    70                 { isBaseLayer: true} ); 
    71             var tiled_resize_effect = new OpenLayers.Layer.WMS( "WMS tiled resize",  
    72                 "http://labs.metacarta.com/wms/vmap0?", {layers: 'basic'},  
    73                 { isBaseLayer: true, transitionEffect: 'resize'} ); 
    74  
    75             map.addLayers([single_default_effect, single_resize_effect, 
    76                            tiled_default_effect, tiled_resize_effect]); 
    77             map.addControl(new OpenLayers.Control.LayerSwitcher()); 
    78             map.setCenter(new OpenLayers.LonLat(6.5, 40.5), 4); 
    79         } 
    80     </script> 
    81   </head> 
    82   <body onload="init()"> 
    83     <h1 id="title">Transition Example</h1> 
    84     <p id="shortdesc"> 
    85       Demonstrates the use of transition effects in tiled and untiled layers.  There are two transitions that are currently implemented, 'default', 'resize'.  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.</p>   
    86     <div id="mapDiv"></div> 
    87     <p> The first layer is an untiled WMS layer with no transition effect. </p> 
    88     <p> The second layer is an untiled WMS layer with a 'resize' effect. </p> 
    89     <p> The third layer is a tiled WMS layer with no transition effect. </p> 
    90     <p> The fourth layer is a tiled WMS layer with a 'resize' effect. </p> 
    91   </body> 
    92 </html> 
    93 <html xmlns="http://www.w3.org/1999/xhtml"> 
    94   <head> 
    95     <style type="text/css"> 
    96         #mapDiv { 
    97             width: 400px; 
    98             height: 400px; 
    99             border: 1px solid black; 
    100         } 
    101     </style> 
    102     <script src="../lib/OpenLayers.js"></script> 
    103     <script type="text/javascript"> 
    104         var map; 
    105         function init(){ 
    106             map = new OpenLayers.Map('mapDiv', {maxResolution: 'auto'}); 
    107  
    108             var single_default_effect = new OpenLayers.Layer.WMS( "WMS untiled default",  
    109                 "http://labs.metacarta.com/wms/vmap0?", {layers: 'basic'},  
    110                 { singleTile: true, isBaseLayer: true} ); 
    111             var single_resize_effect = new OpenLayers.Layer.WMS( "WMS untiled resize",  
    112                 "http://labs.metacarta.com/wms/vmap0?", {layers: 'basic'},  
    113                 { singleTile: true, isBaseLayer: true, transitionEffect: 'resize'} ); 
    114             var tiled_default_effect = new OpenLayers.Layer.WMS( "WMS tiled default ",  
    115                 "http://labs.metacarta.com/wms/vmap0?", {layers: 'basic'},  
    116                 { isBaseLayer: true} ); 
    117             var tiled_resize_effect = new OpenLayers.Layer.WMS( "WMS tiled resize",  
    118                 "http://labs.metacarta.com/wms/vmap0?", {layers: 'basic'},  
    119                 { isBaseLayer: true, transitionEffect: 'resize'} ); 
    120  
    121             map.addLayers([single_default_effect, single_resize_effect, 
    122                            tiled_default_effect, tiled_resize_effect]); 
    123             map.addControl(new OpenLayers.Control.LayerSwitcher()); 
    124             map.setCenter(new OpenLayers.LonLat(6.5, 40.5), 4); 
    125         } 
    126     </script> 
    127   </head> 
    128   <body onload="init()"> 
    129     <h1 id="title">Transition Example</h1> 
    130     <p id="shortdesc"> 
    131       Demonstrates the use of transition effects in tiled and untiled layers.  There are two transitions that are currently implemented, 'default', 'resize'.  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.</p>   
    132     <div id="mapDiv"></div> 
    133     <p> The first layer is an untiled WMS layer with no transition effect. </p> 
    134     <p> The second layer is an untiled WMS layer with a 'resize' effect. </p> 
    135     <p> The third layer is a tiled WMS layer with no transition effect. </p> 
    136     <p> The fourth layer is a tiled WMS layer with a 'resize' effect. </p> 
    137   </body> 
    138 </html>