mirror of
https://github.com/enzet/map-machine.git
synced 2025-08-06 10:09:52 +02:00
Add replace_shapes flag to scheme specification.
If flag is false, main icon shapes should not be replaced.
This commit is contained in:
parent
2ece66d5d0
commit
f0f1a8beb4
2 changed files with 4 additions and 0 deletions
|
@ -205,6 +205,8 @@ class Scheme:
|
||||||
for group in self.icons:
|
for group in self.icons:
|
||||||
for matcher in group["tags"]:
|
for matcher in group["tags"]:
|
||||||
matcher: Dict[str, Any]
|
matcher: Dict[str, Any]
|
||||||
|
if "replace_shapes" in matcher and main_icon:
|
||||||
|
continue
|
||||||
matched: bool = is_matched(matcher, tags)
|
matched: bool = is_matched(matcher, tags)
|
||||||
matcher_tags: Set[str] = matcher["tags"].keys()
|
matcher_tags: Set[str] = matcher["tags"].keys()
|
||||||
if not matched:
|
if not matched:
|
||||||
|
|
|
@ -512,8 +512,10 @@ node_icons:
|
||||||
shapes: [telephone]
|
shapes: [telephone]
|
||||||
- tags: {information: "*"}
|
- tags: {information: "*"}
|
||||||
shapes: [information]
|
shapes: [information]
|
||||||
|
replace_shapes: no
|
||||||
- tags: {tourism: "*"}
|
- tags: {tourism: "*"}
|
||||||
shapes: [historic]
|
shapes: [historic]
|
||||||
|
replace_shapes: no
|
||||||
- tags: {tourism: information}
|
- tags: {tourism: information}
|
||||||
shapes: [information]
|
shapes: [information]
|
||||||
- tags: {information: guidepost}
|
- tags: {information: guidepost}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue