Ignore:
Timestamp:
06/10/09 10:07:48 (11 years ago)
Author:
pnorton
Message:

Made some improvements to the wcsdown page and fixed a couple of layout issues.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cowsclient/trunk/cowsclient/controllers/wcsdown.py

    r5778 r5818  
    4444        c.time_end = params.get('TIME_END', None) 
    4545        layer = params.get('LAYER', None) 
    46         format = params.get('FOMRAT', None) 
     46        format = params.get('FORMAT', None) 
    4747        crs = params.get('CRS', None) 
    4848        c.message = params.get('MESSAGE', "") 
     
    5050         
    5151        layers = [] 
     52        supportedFormats = [] 
     53        supportedCRS = [] 
     54        bboxLimits = None 
    5255        timepositions = None 
    5356         
     
    6063            if layer != None: 
    6164                st1 = time.time() 
    62                 layerMetadata, c.bboxLimits, timepositions, c.supportedFormats, c.supportedCRS =\ 
     65                layerMetadata, bboxLimits, timepositions, supportedFormats, supportedCRS =\ 
    6366                       self._getWCSMetadata(wcs, layer) 
    6467                log.debug("retrieved layer metadata in  = %s" % (time.time() - st1,)) 
     
    6669         
    6770        if bbox != None: 
    68             c.bboxLimits = bbox 
     71            c.selected_bbox = bbox 
     72        elif bboxLimits != None: 
     73            c.selected_bbox = bboxLimits 
     74        else: 
     75            c.selected_bbox = '-180.0,-90.0,180.0,90.0' 
    6976         
    7077         
     
    7582            c.timedata = utils.toJSON(options)  
    7683             
    77         c.crs = crs 
    7884        c.endpoint = endpoint 
    79         c.layer = layer 
    80         c.layers = [''] 
    81         c.layers.extend(layers) 
     85         
     86        c.selected_layer = layer 
     87        c.layer_options = [(x,x) for x in layers] 
     88        c.layer_options.insert(0, ("","")) #add an empty value at the start 
     89         
     90        c.selected_format = format 
     91        c.format_options = [(x,x) for x in supportedFormats] 
     92        c.format_options.insert(0, ("","")) #add an empty value at the start 
     93         
     94        c.selected_crs = crs 
     95        c.crs_options = [(x,x) for x in supportedCRS] 
     96        c.crs_options.insert(0, ("","")) #add an empty value at the start 
    8297         
    8398        #get server information from config file 
Note: See TracChangeset for help on using the changeset viewer.