Changeset 3691


Ignore:
Timestamp:
27/03/08 16:45:40 (11 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.

Location:
TI05-delivery/ows_framework/trunk/ows_server/ows_server
Files:
3 added
2 deleted
2 edited

Legend:

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

    r3421 r3691  
    33    <head> 
    44      <replace py:replace="pagehead()"/> 
    5  
    6       <script src="$g.server/js/OpenLayers.js"/> 
     5          <script src="$g.server/js/wmsc.js"></script> 
     6          <script src="$g.server/js/prototype.js"></script> 
     7          <script src="http://www.openlayers.org/api/OpenLayers.js"></script> 
    78      <script src="$g.server/js/openlayers-x.js"/> 
    8       <script src="$g.server/js/OLMapBox.js"/> 
     9      <script src="$g.server/js/dimensionControl.js"/> 
     10      <script src="$g.server/js/mapControl.js"/> 
    911      <script type="text/javascript"> 
    1012        var app = null; 
    1113        function initOLMapBox() { 
    12           app = new OLMapBoxApp('map','discoForm', 440, 10); 
     14          var controlMarkup = '<tr>\ 
     15                <td>Northerly Latitude:</td>\ 
     16        <td colspan="2" align="center">\ 
     17                        <input size="7" value="${c.bbox[0]}" name="bboxN"/>\ 
     18                </td>\ 
     19                </tr>\ 
     20                <tr>\ 
     21                        <td>Longitudinal Extent:</td>\ 
     22                <td align="center"><input size="8" value="${c.bbox[1]}" name="bboxW"/></td>\ 
     23                <td align="center"><input size="8" value="${c.bbox[2]}" name="bboxE"/></td></tr>\ 
     24        <tr><td> Southerly Latitude:</td>\ 
     25        <td colspan="2" align="center">\ 
     26                <input size="7" value="${c.bbox[3]}" name="bboxS"/></td></tr>\ 
     27        <tr><td colspan="3">(Units: degrees, north and east positive)</td></tr>'; 
     28         
     29          var coordControl = new WMSC.DimControl('dims', 'discoForm', controlMarkup); 
     30          app = new WMSC.VisApp('map', 10, 440, false); 
     31          app.addDimensionControl(coordControl); 
    1332        } 
    1433      </script> 
     
    102121                            </div> 
    103122                    </td></tr> 
    104                     <tr><td>Northerly Latitude:</td> 
    105                         <td colspan="2" align="center"> 
    106                                 <input size="7" value="${c.bbox[0]}" name="bboxN"/> 
    107                         </td></tr> 
    108                     <tr><td>Longitudinal Extent:</td> 
    109                         <td align="center"><input size="8" value="${c.bbox[1]}" name="bboxW"/></td> 
    110                         <td align="center"><input size="8" value="${c.bbox[2]}" name="bboxE"/></td></tr> 
    111                     <tr><td> Southerly Latitude:</td> 
    112                         <td colspan="2" align="center"> 
    113                             <input size="7" value="${c.bbox[3]}" name="bboxS"/> 
    114                         </td></tr> 
    115                         <tr><td colspan="3">(Units: degrees, north and east positive)</td></tr> 
     123                    <tr> 
     124                    <td align="center"> 
     125                    <div id="dims"/> 
     126                    </td> 
     127                    </tr> 
    116128                    </table> 
    117129                </div> <!-- end right div --> 
  • 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.