mirror of
https://github.com/enzet/map-machine.git
synced 2025-05-09 23:26:55 +02:00
Issue #11: fix user and time modes.
This commit is contained in:
parent
f452a08177
commit
f88f3b9f50
3 changed files with 26 additions and 16 deletions
|
@ -219,6 +219,8 @@ class Constructor:
|
|||
nodes = way.nodes
|
||||
|
||||
if self.mode == "user-coloring":
|
||||
if not way:
|
||||
return
|
||||
user_color = get_user_color(way.user, self.seed)
|
||||
self.ways.append(
|
||||
Way("way", nodes, path,
|
||||
|
@ -629,8 +631,10 @@ class Constructor:
|
|||
|
||||
if self.mode == "user-coloring":
|
||||
fill = get_user_color(node.user, self.seed)
|
||||
shapes = ["small"]
|
||||
if self.mode == "time":
|
||||
fill = get_time_color(node.timestamp)
|
||||
shapes = ["small"]
|
||||
|
||||
# for k in tags:
|
||||
# if k in processed or self.no_draw(k):
|
||||
|
@ -664,4 +668,4 @@ class Constructor:
|
|||
# print("Tags processed: " + str(processed_tags) + ", tags skipped: " +
|
||||
# str(skipped_tags) + " (" +
|
||||
# str(processed_tags / float(
|
||||
# processed_tags + skipped_tags) * 100) + " %).")
|
||||
# processed_tags + skipped_tags) * 100) + " %).")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue