From 7e2d9ba5afb106a1ca0712c7ec37d73670a9ea9a Mon Sep 17 00:00:00 2001 From: Sergey Vartanov Date: Wed, 17 Aug 2022 02:41:42 +0300 Subject: [PATCH] Make credits optional. --- map_machine/map_configuration.py | 1 + map_machine/mapper.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/map_machine/map_configuration.py b/map_machine/map_configuration.py index 09aebd6..e49f08b 100644 --- a/map_machine/map_configuration.py +++ b/map_machine/map_configuration.py @@ -60,6 +60,7 @@ class MapConfiguration: use_building_colors: bool = False show_overlapped: bool = False credit: Optional[str] = "© OpenStreetMap contributors" + show_credit: bool = True @classmethod def from_options( diff --git a/map_machine/mapper.py b/map_machine/mapper.py index a1f64cf..cbce070 100644 --- a/map_machine/mapper.py +++ b/map_machine/mapper.py @@ -130,7 +130,8 @@ class Map: self.svg, occupied, self.configuration.label_mode ) - self.draw_credits(constructor.flinger.size) + if self.configuration.show_credit: + self.draw_credits(constructor.flinger.size) def draw_buildings(self, constructor: Constructor) -> None: """Draw buildings: shade, walls, and roof."""