source: DPPP/ukcip02_server/trunk/ukcip_server/ukcip_server/model/__init__.py @ 3551

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/DPPP/ukcip02_server/trunk/ukcip_server/ukcip_server/model/__init__.py@3551
Revision 3551, 515 bytes checked in by spascoe, 14 years ago (diff)

Testcard works demonstrating new WMS layer interface.

Line 
1# Load submodule
2#import ukcip02
3
4from ows_common.pylons.model import setLayerMapper
5from ows_common.service.wms_iface import ILayerMapper
6from sample_layer import TestcardLayer
7
8testLayer = TestcardLayer()
9
10import logging
11log = logging.getLogger(__name__)
12
13class LayerMapper(ILayerMapper):
14    def __init__(self):
15        log.debug('Creating testcard LayerMapper')
16
17    def map(self, **kwargs):
18       
19        return dict(test=testLayer)
20
21# Register the LayerMapper with ows_common
22setLayerMapper(LayerMapper())
Note: See TracBrowser for help on using the repository browser.