Changeset 4102


Ignore:
Timestamp:
05/08/08 11:40:23 (11 years ago)
Author:
spascoe
Message:

Stripping out the HTML renderring of GetFeatureInfo? in wms_controller.py. Styling should be the responsibility of the layer object.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cows/trunk/cows/pylons/wms_controller.py

    r4101 r4102  
    444444            print layerObj.title 
    445445            print layerObj.featureInfoFormats 
    446             if format not in layerObj.featureInfoFormats: 
    447                 raise InvalidParameterValue('Layer %s does not support GetFeatureInfo in format %s' %(layerName, format), 'info_format') 
     446        if format not in layerObj.featureInfoFormats: 
     447            raise InvalidParameterValue('Layer %s does not support GetFeatureInfo in format %s' %(layerName, format), 'info_format') 
    448448 
    449449            if version == '1.1.1': 
     
    457457 
    458458        # Dimension handling 
    459             dimValues = {} 
    460             for dimName, dim in layerObj.dimensions.items(): 
    461                 defaultValue = dim.extent[0] 
    462                 dimValues[dimName] = self.getOwsParam(dimName, default=defaultValue) 
    463          
    464             htmlResponse = htmlResponse+"<li> Layer Name: "+layerName+" <br />" 
    465         # Call the layer 
    466             htmlResponse =htmlResponse+layerObj.getFeatureInfo(format, srs, (x, y), dimValues)+"</li>" 
    467          
    468         htmlResponse = htmlResponse+"</ul></body></html>" 
    469          
    470         response.headers['Content-Type'] = format 
    471         response.write(htmlResponse) 
     459        dimValues = {} 
     460        for dimName, dim in layerObj.dimensions.items(): 
     461            defaultValue = dim.extent[0] 
     462            dimValues[dimName] = self.getOwsParam(dimName, default=defaultValue) 
     463         
     464        response.headers['Content-Type'] = format 
     465        response.write(layerObj.getFeatureInfo(format, srs, (x, y), dimValues)) 
    472466 
    473467    def GetLegend(self): 
Note: See TracChangeset for help on using the changeset viewer.