From 378e4fa822e55a2042dd7cebd3411cf45e43f42b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laura=20Kl=C3=BCnder?= Date: Tue, 14 Nov 2017 15:06:50 +0100 Subject: [PATCH] add ground colors to engine colors --- src/c3nav/mapdata/render/renderer.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/c3nav/mapdata/render/renderer.py b/src/c3nav/mapdata/render/renderer.py index ec4ea88c..8096ab9f 100644 --- a/src/c3nav/mapdata/render/renderer.py +++ b/src/c3nav/mapdata/render/renderer.py @@ -122,12 +122,14 @@ class MapRenderer: engine.add_geometry(geometry, altitude=altitudearea.altitude, fill=FillAttribs('#eeeeee'), category='ground') + i = 0 for color, areas in altitudearea.colors.items(): # only select ground colors if their access restriction is unlocked areas = tuple(area for access_restriction, area in areas.items() if access_restriction in unlocked_access_restrictions) if areas: - engine.add_geometry(hybrid_union(areas), fill=FillAttribs(color), category='ground') + i += 1 + engine.add_geometry(hybrid_union(areas), fill=FillAttribs(color), category='groundcolor%s' % i) # add walls, stroke_px makes sure that all walls are at least 1px thick on all zoom levels, walls = None