Nicer background-* handling
This commit is contained in:
parent
63d95fb4ab
commit
6e091a7a69
2 changed files with 8 additions and 13 deletions
19
src/komap.py
19
src/komap.py
|
@ -340,22 +340,17 @@ if options.renderer == "mapnik":
|
|||
continue
|
||||
elif zlayer not in range(-5,6):
|
||||
continue
|
||||
if entry["type"] in ("way", "area", "polygon"):
|
||||
if "fill-color" in entry["style"] or "fill-image" in entry["style"]:
|
||||
xml += xml_rule_start()
|
||||
xml += x_scale
|
||||
xml += xml_filter(entry["rulestring"])
|
||||
if "fill-color" in entry["style"]:
|
||||
xml += xml_polygonsymbolizer(entry["style"].get("fill-color", "black"), entry["style"].get("fill-opacity", "1"))
|
||||
if "fill-image" in entry["style"]:
|
||||
xml += xml_polygonpatternsymbolizer(entry["style"].get("fill-image", ""))
|
||||
sql.add(entry["sql"])
|
||||
itags.update(entry["chooser"].get_interesting_tags(entry["type"], zoom))
|
||||
xml += xml_rule_end()
|
||||
|
||||
|
||||
if "width" in entry["style"] or "line-style" in entry["style"]:
|
||||
xml += xml_rule_start()
|
||||
xml += x_scale
|
||||
xml += xml_filter(entry["rulestring"])
|
||||
if entry["type"] in ("way", "area", "polygon"):
|
||||
if "fill-color" in entry["style"]:
|
||||
xml += xml_polygonsymbolizer(entry["style"].get("fill-color", "black"), entry["style"].get("fill-opacity", "1"))
|
||||
if "fill-image" in entry["style"]:
|
||||
xml += xml_polygonpatternsymbolizer(entry["style"].get("fill-image", ""))
|
||||
if "width" in entry["style"]:
|
||||
xml += xml_linesymbolizer(color=entry["style"].get("color", "black"),
|
||||
width=entry["style"].get("width", "1"),
|
||||
|
|
|
@ -83,7 +83,7 @@ class StyleChooser:
|
|||
"""
|
||||
a = set()
|
||||
b = ""
|
||||
needed = set(["width", "casing-width", "fill-color", "fill-image", "icon-image", "text", "extrude"])
|
||||
needed = set(["width", "casing-width", "fill-color", "fill-image", "icon-image", "text", "extrude", "background-image", "background-color"])
|
||||
|
||||
if not needed.isdisjoint(set(self.styles[0].keys())):
|
||||
for c in self.ruleChains:
|
||||
|
|
Loading…
Add table
Reference in a new issue