render obstacle color

This commit is contained in:
Laura Klünder 2019-12-22 20:51:47 +01:00
parent bfd75f9ee3
commit 4826930bbb
4 changed files with 50 additions and 32 deletions

View file

@ -106,9 +106,15 @@ class MapRenderer:
# add obstacles after everything related to ground for the nice right order
for i, altitudearea in enumerate(geoms.altitudeareas):
for height, height_obstacles in altitudearea.obstacles.items():
for obstacle in height_obstacles:
engine.add_geometry(obstacle, fill=FillAttribs('#B7B7B7'),
stroke=StrokeAttribs('#888888', 0.05, min_px=0.2), category='obstacles')
for color, color_obstacles in height_obstacles.items():
print(height, color)
for obstacle in color_obstacles:
engine.add_geometry(
obstacle,
fill=FillAttribs(color or '#B7B7B7'),
stroke=None if color else StrokeAttribs('#888888', 0.05, min_px=0.2),
category='obstacles'
)
# add walls, stroke_px makes sure that all walls are at least 1px thick on all zoom levels,
walls = None