Fixed MaxZoom
This commit is contained in:
parent
2f9bab6373
commit
7bc4153a63
3 changed files with 6 additions and 4 deletions
|
@ -27,6 +27,7 @@ class Eval():
|
|||
try:
|
||||
self.expr = compile (s, "MapCSS expression", "eval")
|
||||
except:
|
||||
print "Can't compile %s" % s
|
||||
self.expr = compile ("0", "MapCSS expression", "eval")
|
||||
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ class Rule():
|
|||
def __init__(self, s=''):
|
||||
self.conditions = []
|
||||
self.isAnd = True
|
||||
self.minZoom = 0 #### FIXME: take from MapCSS creation thingz
|
||||
self.minZoom = 0
|
||||
self.maxZoom = 19
|
||||
self.subject = s # "", "way", "node" or "relation"
|
||||
def __repr__(self):
|
||||
|
|
|
@ -122,7 +122,7 @@ class StyleChooser:
|
|||
"these things are arrays of float's or not in table at all"
|
||||
try:
|
||||
b = b.split(",")
|
||||
b = [int(x) for x in b]
|
||||
b = [float(x) for x in b]
|
||||
ra[a]= b
|
||||
except ValueError:
|
||||
pass
|
||||
|
@ -233,6 +233,8 @@ class StyleChooser:
|
|||
adds into the current ruleChain (starting a new Rule)
|
||||
"""
|
||||
self.ruleChains[self.rcpos].append(Rule(e))
|
||||
self.ruleChains[self.rcpos][len(self.ruleChains[self.rcpos])-1].minZoom=float(self.scalepair[0])
|
||||
self.ruleChains[self.rcpos][len(self.ruleChains[self.rcpos])-1].maxZoom=float(self.scalepair[1])
|
||||
|
||||
|
||||
|
||||
|
@ -251,8 +253,7 @@ class StyleChooser:
|
|||
adds into the current ruleChain (existing Rule)
|
||||
"""
|
||||
self.ruleChains[self.rcpos][len(self.ruleChains[self.rcpos])-1].conditions.append(c)
|
||||
self.ruleChains[self.rcpos][len(self.ruleChains[self.rcpos])-1].minZoom=float(self.scalepair[0])
|
||||
self.ruleChains[self.rcpos][len(self.ruleChains[self.rcpos])-1].maxZoom=float(self.scalepair[1])
|
||||
|
||||
|
||||
def addStyles(self, a):
|
||||
"""
|
||||
|
|
Loading…
Add table
Reference in a new issue