Ignore:
Timestamp:
13/06/10 20:20:13 (10 years ago)
Author:
astephen
Message:

bbox made to match openlayers in order of directions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cows_wps/trunk/cows_wps/renderer/form_renderer.py

    r7000 r7001  
    9999        return html 
    100100 
     101    def OLDrenderBBox(self, name, extent="90|-180|-90|180"): 
     102        """ 
     103        Renders a bounding box and N/W/S/E/ selectors. 
     104        """ 
     105        if extent == False: extent = "90|-180|-90|180" 
     106 
     107        (n, w, s, e) = extent.split("|") 
     108 
     109        html = """      <label for="_north">North:</label> <input type="text" id="_north" name="_north" value="%s" onChange="updateBBox('%s');" /><br> 
     110        <label for="_west">West:</label> <input type="text" id="_west" name="_west" value="%s" onChange="updateBBox('%s');" /><br> 
     111        <label for="_south">South:</label> <input type="text" id="_south" name="_south" value="%s" onChange="updateBBox('%s');" /><br> 
     112        <label for="_east">East:</label> <input type="text" id="_east" name="_east" value="%s" onChange="updateBBox('%s');" /><br> 
     113        <input type="hidden" id="%s" name="%s" value="%s" /> 
     114        """ % (n, name, w, name, s, name, e, name, name, name, extent) 
     115 
     116        return html 
     117 
    101118 
    102119    def renderBBox(self, name, extent): 
    103120        """ 
    104121        Renders a bounding box and N/W/S/E selectors. 
    105         ``extent`` is received as a string of "west|south|east|north". 
     122        ``extent`` is received as a string of "north|west|south|east". 
    106123        """ 
    107124        if extent == False: extent = "90|-180|-90|180" 
     
    117134            <script type="text/javascript"> 
    118135                var initial_extent = [%s, %s, %s, %s]; 
    119                 addValidator('bbox_hidden_input', 'bounding_box', '%s', 'Your selected spatial bounding box must overlap with the available extent of: (%s) as ("north|west|south|east").', false); 
     136                addValidator('%s', 'bounding_box', extent, 'Your selected spatial bounding box must overlap with the available extent of: (%s) as ("north|west|south|east").', false); 
    120137            </script> 
    121138        </div> 
    122         """ % (name, n, w, s, e, extent, extent) 
    123  
     139        """ % (name, n, w, s, e, name, extent) 
    124140        return html      
    125141 
Note: See TracChangeset for help on using the changeset viewer.