def test_ParameterMap(self): from clld.web.maps import ParameterMap class MockRoute(Mock): name = 'parameter' self.set_request_properties(matched_route=MockRoute()) dt = ParameterMap(common.Parameter.get('parameter'), self.env['request']) for l in dt.layers: l.representation = 5 dt.render() dt = ParameterMap(common.Parameter.get('no-domain'), self.env['request']) dt.render()
def test_ParameterMap(self): from clld.web.maps import ParameterMap self.set_route('parameter') dt = ParameterMap(common.Parameter.get('parameter'), self.env['request']) for l in dt.layers: l.representation = 5 dt.render() dt = ParameterMap(common.Parameter.get('no-domain'), self.env['request']) dt.render()
def __init__(self, ctx, req, eid='map', col=None, dt=None): self.col, self.dt = col, dt ParameterMap.__init__(self, ctx, req, eid=eid)
def get_legends(self): for legend in ParameterMap.get_legends(self): yield legend yield FilterLegend(self, 'SAILS.getFamily', col=self.col, dt=self.dt)
def __init__(self, *args, **kw): self.family = kw.pop('family', None) ParameterMap.__init__(self, *args, **kw)
def get_legends(self): for l in ParameterMap.get_legends(self): if l.name != 'iconsize': yield l
def get_options(self): return dict_merged(ParameterMap.get_options(self), **OPTIONS)