mirror of
https://github.com/enzet/map-machine.git
synced 2025-06-03 19:31:52 +02:00
Remove specific line icons.
This commit is contained in:
parent
4e92c8e9c2
commit
fa3b49ee75
3 changed files with 3 additions and 41 deletions
|
@ -712,41 +712,6 @@ node_icons:
|
|||
- tags: {"payment:credit_cards": "yes"}
|
||||
add_icon: [credit_card]
|
||||
|
||||
line_icons:
|
||||
- tags: {building: hotel}
|
||||
icon: [bed]
|
||||
- tags: {building: kindergarten}
|
||||
icon: [toy_horse]
|
||||
- tags: {building: office}
|
||||
icon: [briefcase]
|
||||
- tags: {leisure: playground}
|
||||
icon: [toy_horse]
|
||||
- tags: {amenity: ferry_terminal}
|
||||
icon: [anchor]
|
||||
- tags: {amenity: parking}
|
||||
icon: [parking]
|
||||
- tags: {aeroway: landingpad}
|
||||
icon: [booster_landing]
|
||||
- tags: {aeroway: helipad}
|
||||
icon: [h]
|
||||
|
||||
# Add to everything.
|
||||
|
||||
- tags: {wheelchair: "yes"}
|
||||
add_icon: [wheelchair]
|
||||
- tags: {wheelchair: "no"}
|
||||
add_icon: [no_wheelchair]
|
||||
- tags: {foot: "yes"}
|
||||
add_icon: [foot]
|
||||
- tags: {foot: "no"}
|
||||
add_icon: [no_foot]
|
||||
- tags: {bicycle: "yes"}
|
||||
add_icon: [bicycle]
|
||||
- tags: {bicycle: "no"}
|
||||
add_icon: [no_bicycle]
|
||||
- tags: {access: private}
|
||||
add_icon: [private]
|
||||
|
||||
ways:
|
||||
- tags: {indoor: area}
|
||||
stroke: indoor_border_color
|
||||
|
|
|
@ -30,7 +30,7 @@ def draw_grid(step: float = 24, columns: int = 16):
|
|||
|
||||
to_draw: List[Set[str]] = []
|
||||
|
||||
for element in scheme.node_icons + scheme.line_icons: # type: Dict[str, Any]
|
||||
for element in scheme.icons: # type: Dict[str, Any]
|
||||
if "icon" in element:
|
||||
if set(element["icon"]) not in to_draw:
|
||||
to_draw.append(set(element["icon"]))
|
||||
|
|
|
@ -50,8 +50,7 @@ class Scheme:
|
|||
content: Dict[str, Any] = yaml.load(
|
||||
input_file.read(), Loader=yaml.FullLoader)
|
||||
|
||||
self.node_icons: List[Dict[str, Any]] = content["node_icons"]
|
||||
self.line_icons: List[Dict[str, Any]] = content["line_icons"]
|
||||
self.icons: List[Dict[str, Any]] = content["node_icons"]
|
||||
|
||||
self.ways: List[Dict[str, Any]] = content["ways"]
|
||||
|
||||
|
@ -132,9 +131,7 @@ class Scheme:
|
|||
processed: Set[str] = set()
|
||||
fill: Color = DEFAULT_COLOR
|
||||
|
||||
rules = self.node_icons if for_ == "node" else self.line_icons
|
||||
|
||||
for matcher in rules: # type: Dict[str, Any]
|
||||
for matcher in self.icons: # type: Dict[str, Any]
|
||||
matched: bool = True
|
||||
for key in matcher["tags"]: # type: str
|
||||
if key not in tags:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue