Ignore:
Timestamp:
20/08/09 10:36:42 (11 years ago)
Author:
pnorton
Message:

Added the EnableDisplayOptions? to the CsmlGeoplotWmsLayer? class that controls if the display options metadata URL is added to the response, by default it is not.

Also improved the handling of requests outside the boundaries of the data in the csml geoplot slab.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cows/trunk/cows/service/imps/csml_geoplot_backend/csml_geoplot_wms_layer.py

    r5632 r5641  
    3434class CSMLGeoplotWmsLayer(IwmsLayer): 
    3535     
     36    EnableDisplayOptions = False 
    3637     
    3738    def __init__(self, title, abstract, dimensions, units, crss, feature, 
     
    291292     
    292293    def _buildMetadataURL(self): 
    293         onlineRes = OnlineResource(url_for(qualified=True, action='index') +\ 
    294                                     "?request=GetDisplayOptions&layers=%s" % self.name) 
    295          
    296         displayMetadata = MetadataURL(metadataType='display_options', format='application/json', onlineResource=onlineRes) 
    297          
    298         return [displayMetadata]  
     294         
     295        if CSMLGeoplotWmsLayer.EnableDisplayOptions == True: 
     296            onlineRes = OnlineResource(url_for(qualified=True, action='index') +\ 
     297                                        "?request=GetDisplayOptions&layers=%s" % self.name) 
     298             
     299            displayMetadata = MetadataURL(metadataType='display_options', format='application/json', onlineResource=onlineRes) 
     300             
     301            return [displayMetadata]  
     302        else: 
     303            return [] 
Note: See TracChangeset for help on using the changeset viewer.