Postgis hints now hints only rules that will actually render, not just modify others'
This commit is contained in:
parent
38847d1878
commit
e1fcbe6ba4
1 changed files with 15 additions and 13 deletions
|
@ -83,19 +83,21 @@ class StyleChooser:
|
|||
"""
|
||||
a = set()
|
||||
b = ""
|
||||
for c in self.ruleChains:
|
||||
|
||||
for r in c:
|
||||
p = r.get_sql_hints(type, zoom)
|
||||
if p:
|
||||
q = "("+p[1] + ")"#[t[1] for t in p]
|
||||
if q == "()":
|
||||
q = ""
|
||||
if b and q:
|
||||
b += " OR "+ q
|
||||
else:
|
||||
b = q
|
||||
a.update(p[0])
|
||||
needed = set(["width", "casing-width", "fill-color", "fill-image", "icon-image", "text", "extrude"])
|
||||
|
||||
if not needed.isdisjoint(set(self.styles[0].keys())):
|
||||
for c in self.ruleChains:
|
||||
for r in c:
|
||||
p = r.get_sql_hints(type, zoom)
|
||||
if p:
|
||||
q = "("+p[1] + ")"#[t[1] for t in p]
|
||||
if q == "()":
|
||||
q = ""
|
||||
if b and q:
|
||||
b += " OR "+ q
|
||||
else:
|
||||
b = q
|
||||
a.update(p[0])
|
||||
# no need to check for eval's
|
||||
return a,b
|
||||
# // Update the current StyleList from this StyleChooser
|
||||
|
|
Loading…
Add table
Reference in a new issue