Make data credit optional.

This commit is contained in:
Sergey Vartanov 2022-05-25 01:05:32 +03:00
parent 7373eadaa6
commit 9b5066fd44
3 changed files with 18 additions and 14 deletions

View file

@ -111,16 +111,17 @@ class Grid:
def get_boundary_box(self) -> BoundaryBox:
"""Compute resulting boundary box with margin of one grid step."""
return BoundaryBox(
-self.x_step,
-self.max_i - self.y_step,
self.max_j + self.x_step,
self.y_step,
-self.x_step * 1.5,
-self.max_i - self.y_step * 1.5,
self.max_j + self.x_step * 1.5,
self.y_step * 1.5,
)
def draw(self, output_path: Path, zoom: float = DEFAULT_ZOOM) -> None:
"""Draw grid."""
configuration: MapConfiguration = MapConfiguration(level="all")
configuration: MapConfiguration = MapConfiguration(
level="all", credit=None
)
flinger: Flinger = Flinger(
self.get_boundary_box(), zoom, self.osm_data.equator_length
)