source: qesdi/wms_ddc_vis/trunk/lib/wms_ddc_vis/controllers/csmlwms.py @ 5500

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/qesdi/wms_ddc_vis/trunk/lib/wms_ddc_vis/controllers/csmlwms.py@5500
Revision 5500, 975 bytes checked in by pnorton, 11 years ago (diff)

Added some JSON to describe the rendering options. Also moved all the common layer slab code to a base slab object.

Line 
1import logging
2
3from cows.pylons.wms_controller import WMSController
4from wms_ddc_vis.model.ddc_layer_mapper import DDCLayerMapper
5
6from wms_ddc_vis.lib.base import request, response
7
8log = logging.getLogger(__name__)
9
10class CsmlwmsController(WMSController):
11    layerMapper = DDCLayerMapper()
12   
13    owsOperations = (WMSController.owsOperations + ['GetDisplayOptions',])
14   
15    def GetDisplayOptions(self):
16       
17        json ="""{
18    "common":[
19            {
20                "type":"select",
21                "name":"cmap",
22                "options":["bone","jet", "copper", "grey", "winter"],
23            },
24            {
25                "type":"value",
26                "name":"cmap_min",
27            },
28            {
29                "type":"value",
30                "name":"cmap_max",
31            },                       
32        ],
33    "grid":[],
34    "contour":[]
35}"""
36
37        request.headers['Content-Type'] = 'application/json'
38        response.write(json)
39
Note: See TracBrowser for help on using the repository browser.