mirror of
https://github.com/enzet/map-machine.git
synced 2025-05-21 13:06:25 +02:00
Refactor text generation.
This commit is contained in:
parent
f317eba64b
commit
958a85fe0a
13 changed files with 129 additions and 126 deletions
|
@ -360,8 +360,10 @@ class Constructor:
|
|||
icon, priority = self.scheme.get_icon(
|
||||
self.icon_extractor, line.tags, for_="line"
|
||||
)
|
||||
labels = self.scheme.construct_text(line.tags, True)
|
||||
|
||||
self.nodes.append(Point(
|
||||
icon, line.tags, center_point, center_coordinates,
|
||||
icon, labels, line.tags, center_point, center_coordinates,
|
||||
is_for_node=False, priority=priority
|
||||
))
|
||||
|
||||
|
@ -377,9 +379,10 @@ class Constructor:
|
|||
icon_set: Icon
|
||||
icon_set, priority = self.scheme.get_icon(
|
||||
self.icon_extractor, line.tags)
|
||||
labels = self.scheme.construct_text(line.tags, True)
|
||||
|
||||
self.nodes.append(Point(
|
||||
icon_set, line.tags, center_point, center_coordinates,
|
||||
icon_set, labels, line.tags, center_point, center_coordinates,
|
||||
is_for_node=False, priority=priority))
|
||||
|
||||
def construct_relations(self) -> None:
|
||||
|
@ -448,14 +451,16 @@ class Constructor:
|
|||
icon_set = Icon([dot], [], color, set(), True)
|
||||
priority = 0
|
||||
draw_outline = False
|
||||
labels = []
|
||||
else:
|
||||
icon_set, priority = self.scheme.get_icon(
|
||||
self.icon_extractor, tags
|
||||
)
|
||||
labels = self.scheme.construct_text(tags, True)
|
||||
|
||||
self.nodes.append(Point(
|
||||
icon_set, tags, flung, node.coordinates, priority=priority,
|
||||
draw_outline=draw_outline
|
||||
icon_set, labels, tags, flung, node.coordinates,
|
||||
priority=priority, draw_outline=draw_outline
|
||||
))
|
||||
|
||||
missing_tags.update(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue