Changeset 4101 for cows/trunk/cows/pylons/wms_controller.py
- Timestamp:
- 05/08/08 11:32:03 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cows/trunk/cows/pylons/wms_controller.py
r4078 r4101 416 416 'version') 417 417 418 418 # Coordinate parameters 419 419 bbox = tuple(float(x) for x in self.getOwsParam('bbox').split(',')) 420 420 width = int(self.getOwsParam('width')) 421 421 height = int(self.getOwsParam('height')) 422 422 423 423 # Get pixel location 424 424 i = int(self.getOwsParam('i')) 425 425 j = int(self.getOwsParam('j')) … … 427 427 # Translate to geo-coordinates 428 428 x, y = bbox_util.pixelToGeo(i, j, bbox, width, height) 429 430 431 429 #start preparing GetFeatureInfo response. Assumes "HTML" output format 430 431 htmlResponse = "<html><body><p> <b>Feature Information about pixel position: "+self.getOwsParam('i')+","+self.getOwsParam('j')+"/geo position: "+str(x)+","+str(y) +"<b/></p>" 432 432 433 433 434 434 layers = self._getLayerParam('query_layers') 435 435 #Adjusts response for multiple layers 436 436 if len(layers) > 1: 437 437 htmlResponse = htmlResponse+" Multiple possible features found as follows:" … … 439 439 htmlResponse = htmlResponse+"<ul>" 440 440 441 format = self.getOwsParam('info_format' )441 format = self.getOwsParam('info_format', default='text/html') 442 442 for layerName, layerObj in layers.iteritems(): 443 443 print format … … 447 447 raise InvalidParameterValue('Layer %s does not support GetFeatureInfo in format %s' %(layerName, format), 'info_format') 448 448 449 450 451 449 if version == '1.1.1': 452 450 srs = self.getOwsParam('srs')
Note: See TracChangeset
for help on using the changeset viewer.