OpenLayers OpenLayers

Changeset 7916

Show
Ignore:
Timestamp:
09/01/08 08:19:43 (3 months ago)
Author:
edgemaster
Message:

Add some more documentation to the example

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • sandbox/edgemaster/openlayers/examples/multiple-projections.html

    r7915 r7916  
    22  <head> 
    33    <link rel="stylesheet" href="../theme/default/style.css" type="text/css" /> 
     4    <link rel="stylesheet" href="style.css" type="text/css" /> 
    45    <style type="text/css"> 
    56        #map { 
    6             width: 70%
    7             height: 475px; 
    8             border: 1px solid black
     7            width: 512px
     8            height: 350px; 
     9            border: 1px solid #ccc
    910        } 
    1011    </style> 
     
    3940             
    4041            // (initialise with the same details as the initial base layer) 
    41                     map = new OpenLayers.Map('map', {maxResolution: 360/512/16, numZoomLevels: 15,  projection: epsg4326, controls: [ new OpenLayers.Control.Navigation(), new OpenLayers.Control.PanZoomBar(), new OpenLayers.Control.LayerSwitcher()]}); 
     42            map = new OpenLayers.Map('map', {controls: [ new OpenLayers.Control.Navigation(), new OpenLayers.Control.PanZoomBar(), new OpenLayers.Control.LayerSwitcher()]}); 
    4243             
    43             osmll = new OpenLayers.Layer.WMS( "OSM - EPSG:4326",  
    44                
     44            osmll = new OpenLayers.Layer.WMS("OSM - EPSG:4326",  
     45               
    4546                 "http://t1.hypercube.telascience.org/tiles?", 
    4647                 "http://t2.hypercube.telascience.org/tiles?", 
    4748                 "http://t3.hypercube.telascience.org/tiles?", 
    4849                 "http://t4.hypercube.telascience.org/tiles?" 
    49                  ],  
    50                  {layers: 'osm-4326', format: 'image/png'}, 
    51                  {maxResolution: 360/512/16, numZoomLevels: 15,  projection: epsg4326}); 
     50                ], 
     51                {layers: 'osm-4326', format: 'image/png'}, 
     52                {maxResolution: 360/512/16, numZoomLevels: 15,  projection: epsg4326} 
     53            ); 
    5254                 
    5355            osmgoo = new OpenLayers.Layer.TMS( 
     
    6971  </head> 
    7072  <body onload="init()"> 
    71     <div id="map"></div> 
    72     <a id="vectorlink" href="" style="display:none">Display via data: URL (FF Only)</a> 
    73     <textarea id="vectors" style="display:none;width:100%" rows="10"></textarea> 
     73    <h1 id="title">Use of multiple projections on one map</h1> 
     74    <div id="tags">projections</div> 
     75    <div id="shortdesc">Shows how OpenLayers handles baselayers of different projections</div> 
     76 
     77    <div id="map" class="smallmap"></div> 
     78    <div id="doc"> 
     79        <p>When switching between two base layers of different projections, OpenLayers will attempt to reproject the centre point of the map and adjust the zoom level to try and match the bounds of the current view as closely as possible. It also reprojects any vector layers that are added to the map.</p> 
     80        <p>When a required transformation function is not found, no transformation of coordinates will take place but the layer will not be prevented from changing.</p> 
     81        <p>No checks are made to ensure transformations are within the ranges of the projections specified.</p> 
     82    </div> 
    7483  </body> 
    7584</html>