Ignore:
Timestamp:
27/03/08 16:45:40 (12 years ago)
Author:
cbyrom
Message:

Create new controls to componentise functionality for maps, layer
selection and dimension selection. Replace existing functionality with
this.
Add verbose documentation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TI05-delivery/ows_framework/trunk/ows_server/ows_server/templates/viewItems.kid

    r3667 r3691  
    3232<link type="text/css" rel="stylesheet" href="/layout/control.css"/> 
    3333 
    34 <script src="js/wmsc.js"></script> 
    35 <script src="js/prototype.js"></script> 
    36 <script src="js/xpath.js"></script> 
     34<script src="$g.server/js/wmsc.js"></script> 
     35<script src="$g.server/js/prototype.js"></script> 
    3736<script src="http://www.openlayers.org/api/OpenLayers.js"></script> 
    38 <script src="js/openlayers-x.js"></script> 
    39 <script src="js/capabilities.js"></script> 
    40 <script src="js/wmscControl.js"></script> 
    41 <script src="js/vis-app.js"></script> 
    42       <script src="js/OLMapBox.js"/> 
     37<script src="$g.server/js/openlayers-x.js"/> 
     38<script src="$g.server/js/dimensionControl.js"/> 
     39<script src="$g.server/js/mapControl.js"/> 
     40<script src="$g.server/js/layerControl.js"></script> 
     41<script src="$g.server/js/capabilities.js"></script> 
    4342<!-- END: WMSC library --> 
    44  
    45 <!-- DDC specialisation of WMSC --> 
    46 <script src="js/ddc-control.js"></script> 
    4743 
    4844<script type="text/javascript"> 
     
    5450function init()  
    5551{ 
    56     control = new WMSC.Control('layerTree', 'layerLeaves', 'dims'); 
     52    var coordControl = new WMSC.DimControl('dims'); 
     53    var layerControl = new WMSC.VisAppLayers('layerTree', 'layerLeaves', coordControl); 
    5754    <for py:for="i in session['viewItems']" class="dataset" py:strip="True"> 
    5855        <span py:if="i.wmcURL" py:strip="True"> 
    59                 control.addWebMapContext('viewItems', '${i.wmcURL}'); 
     56                layerControl.addWebMapContext('${i.wmcURL}'); 
    6057            </span> 
    6158    </for> 
    62     app = new WMSC.VisApp('map', control); 
     59           
     60    app = new WMSC.VisApp('map', 10, 640, true); 
     61    app.addDimensionControl(coordControl); 
     62    app.addLayerControl(layerControl); 
    6363} 
    6464 
Note: See TracChangeset for help on using the changeset viewer.