diff --git a/map_machine/map_configuration.py b/map_machine/map_configuration.py index 060e3e7..6be892a 100644 --- a/map_machine/map_configuration.py +++ b/map_machine/map_configuration.py @@ -58,7 +58,7 @@ class MapConfiguration: @classmethod def from_options( - cls, options: argparse.Namespace, zoom_level: int + cls, options: argparse.Namespace, zoom_level: float ) -> "MapConfiguration": """Initialize from command-line options.""" return cls( diff --git a/map_machine/mapper.py b/map_machine/mapper.py index 8f1490c..6588f5c 100644 --- a/map_machine/mapper.py +++ b/map_machine/mapper.py @@ -191,7 +191,7 @@ def ui(arguments: argparse.Namespace) -> None: :param arguments: command-line arguments """ configuration: MapConfiguration = MapConfiguration.from_options( - arguments, int(arguments.zoom) + arguments, float(arguments.zoom) ) cache_path: Path = Path(arguments.cache) cache_path.mkdir(parents=True, exist_ok=True) diff --git a/map_machine/ui.py b/map_machine/ui.py index e1d2283..5ff0bb2 100644 --- a/map_machine/ui.py +++ b/map_machine/ui.py @@ -159,7 +159,7 @@ def add_tile_arguments(parser: argparse.ArgumentParser) -> None: "-z", "--zoom", type=str, - metavar="", + metavar="", help="OSM zoom levels; can be list of numbers or ranges, e.g. `16-18`, " "`16,17,18`, or `16,18-20`", default="18", @@ -233,8 +233,8 @@ def add_render_arguments(parser: argparse.ArgumentParser) -> None: parser.add_argument( "-z", "--zoom", - type=int, - metavar="", + type=float, + metavar="", help="OSM zoom level", default=18, )