Changeset 5340 for cowsclient


Ignore:
Timestamp:
27/05/09 10:08:55 (10 years ago)
Author:
domlowe
Message:

removing console log messages

Location:
cowsclient
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • cowsclient/cowsclient/lib/wmc_util.py

    r5307 r5340  
    1010""" 
    1111from cowsclient.lib.base import * 
    12 #from ndgUtils.DocumentRetrieve import genericHTTP 
    13 #from ndgUtils.ETxmlView import loadET,et2text, nsdumb 
    1412from cowsclient.model.WMC import WMC 
    1513from cowsclient.lib import exceptions   
     
    1715import logging 
    1816log = logging.getLogger(__name__) 
     17 
    1918 
    2019def getConTerraDoc(wmcURLs): 
     
    5150    # retrieve context data from the specifiled url 
    5251    wmcDoc = RetrieveWebMapContext(self, self.inputs['ENDPOINT']) 
    53      
     52    log.info('WMC RESPONSE %s'%response) 
    5453    response.headers['Content-Type'] = 'text/xml' 
    5554    response.write(wmcDoc) 
     
    5756 
    5857def GetLegend(self): 
    59     """ 
    60     Lookup a legend for a WMS map 
    61     NB, all required parameters are already included in the endpoint by this stage 
    62     """ 
    63     endpoint = self.inputs['ENDPOINT'] 
    64     if not endpoint: 
    65         raise exceptions.MissingParameterValue, "ENDPOINT parameter required" 
    66     log.info('Getting Legend from endpoint: ' + endpoint) 
     58    #not implemented yet 
     59    return None 
    6760 
    68     try: 
    69         filehandle = urllib2.urlopen(endpoint) 
    70     except IOError: 
    71         raise exceptions.URLUnavailable, "Could not access WMS endpoint: %s" % endpoint 
    72          
    73     response.headers['Content-Type'] = 'text/xml' 
    74     response.write(filehandle.read()) 
     61#def GetLegend(self): 
     62#    """ 
     63#    Lookup a legend for a WMS map 
     64#    NB, all required parameters are already included in the endpoint by this stage 
     65#    """ 
     66#    endpoint = self.inputs['ENDPOINT'] 
     67#    if not endpoint: 
     68#        raise exceptions.MissingParameterValue, "ENDPOINT parameter required" 
     69#    log.info('Getting Legend from endpoint: ' + endpoint) 
     70#    try: 
     71#        req = urllib2.Request(endpoint,urllib.urlencode(request.params),{'Cookie': request.headers.get('Cookie', '')}) 
     72#        filehandle = urllib2.urlopen(req) 
     73#    except IOError: 
     74#        raise exceptions.URLUnavailable, "Could not access WMC endpoint: %s" % endpoint 
     75#    response.headers['Content-Type'] = 'text/xml' 
     76#    response.write(filehandle.read()) 
    7577     
    7678def RetrieveWebMapContext(self, endpoint): 
     
    8183    if not endpoint: 
    8284        raise exceptions.MissingParameterValue, "ENDPOINT parameter required" 
    83     log.info('Getting WebMapContext from endpoint: ' + endpoint) 
    84  
     85    log.info('Getting WebMapContext from endpoint: ' + endpoint)    
     86     
     87    #cookies are passed to enable authorisation mechanisms e.g. ndg security 
    8588    try: 
    86         filehandle = urllib2.urlopen(endpoint) 
     89        req = urllib2.Request(endpoint,urllib.urlencode(request.params),{'Cookie': request.headers.get('Cookie', '')}) 
     90        filehandle = urllib2.urlopen(req) 
    8791    except IOError: 
    8892        raise exceptions.URLUnavailable, "Could not access WMC endpoint: %s" % endpoint 
    89  
    9093    return filehandle.read() 
    9194         
  • cowsclient/cowsclient/public/demo.js

    r5266 r5340  
    108108// call WCS with current map parameters (bbox, layer, crs, dimensions etc) 
    109109function callWCS() { 
    110         console.log('making WCS request'); 
    111         console.log('layer name: ' +dataLayer.name); 
    112         console.log('map extent: ' + map.getExtent()); 
     110        //console.log('making WCS request'); 
     111        //console.log('layer name: ' +dataLayer.name); 
     112        //console.log('map extent: ' + map.getExtent()); 
    113113        //TODO: read the dimopt_d select dropdowns - get values 
    114114        //convert into WCS request. 
  • cowsclient/cowsclient/public/js/VisMapBox.js

    r5266 r5340  
    103103 
    104104    loadColourbar: function(wmsURL, featureId, time) { 
    105         console.log('Loading colourbar'); 
     105        //console.log('Loading colourbar'); 
    106106        var url = (wmsURL + '?REQUEST=GetColourbar&LAYERS=' + featureId  
    107107                   + '&TIME=' + time 
  • cowsclient/cowsclient/public/js/mapControl.js

    r5266 r5340  
    132132                this.map.removeLayer(this.map.layers[0]); 
    133133                } 
    134  
    135134        // Setup an initial baselayer - NB, without this, the transparent layers will not display 
    136135        if (!this.visLayer) 
     
    169168                                title = child.getAttribute("title"); 
    170169                                layerName = child.getAttribute("layerName"); 
    171                                 console.log('name ' + layerName); 
     170                                //console.log('name ' + layerName); 
    172171                        mapLayer = new OpenLayers.Layer.WMS( 
    173172                                                title, 
  • cowsclient/cowsclient/public/js/wcs.js

    r5266 r5340  
    2323        var urlparts = wmsurl.split('?'); 
    2424        var wcsEndpoint=urlparts[0].replace('wms', 'wcs') +'?'; 
    25         console.log('wcs endpoint =  ' +wcsEndpoint);     
     25        //console.log('wcs endpoint =  ' +wcsEndpoint);   
    2626        coords=document.getElementById('coordsForm'); 
    2727        var bbox =coords['bboxW'].getValue() + ',' + coords['bboxS'].getValue() + ',' + coords['bboxE'].getValue() + ',' + coords['bboxN'].getValue() 
     
    4848                wcsurl = wcsurl + param + '=' + params[param] + '&'; 
    4949                } 
    50                 console.log('Making wcs request to ' + wcsurl) 
     50                //console.log('Making wcs request to ' + wcsurl) 
    5151                window.open(wcsurl, 'download');  
    5252                return false; 
  • cowsclient/cowsclient/public/js/wmsc.js

    r5266 r5340  
    1616    { 
    1717                /* If Firebug (and Mozilla?) */ 
    18                 console.log(msg); 
     18                //console.log(msg); 
    1919    } 
    2020    catch(err)  
  • cowsclient/setup.py

    r5337 r5340  
    88setup( 
    99    name='cowsclient', 
    10     version="0.0.2", 
     10    version="0.0.4", 
    1111    #description='', 
    1212    #author='', 
Note: See TracChangeset for help on using the changeset viewer.