diff --git a/map_machine/map_configuration.py b/map_machine/map_configuration.py index 1f661f8..3ad63ce 100644 --- a/map_machine/map_configuration.py +++ b/map_machine/map_configuration.py @@ -69,6 +69,7 @@ class MapConfiguration: options.level, options.seed, options.show_tooltips, + options.country, ) def is_wireframe(self) -> bool: diff --git a/map_machine/scheme.py b/map_machine/scheme.py index 17da111..fc7a420 100644 --- a/map_machine/scheme.py +++ b/map_machine/scheme.py @@ -97,7 +97,6 @@ def match_location(restrictions: dict[str, str], country: str) -> bool: if ( "include" in restrictions and restrictions["include"] != "world" - and country != "world" and country not in restrictions["include"] ): return False diff --git a/map_machine/ui.py b/map_machine/ui.py index 5d1c1e9..d6e16a7 100644 --- a/map_machine/ui.py +++ b/map_machine/ui.py @@ -120,6 +120,12 @@ def add_map_arguments(parser: argparse.ArgumentParser) -> None: action=argparse.BooleanOptionalAction, default=False, ) + parser.add_argument( + "--country", + help="two-letter code (ISO 3166-1 alpha-2) of country, that should be " + "used for location restrictions", + default="world", + ) def add_tile_arguments(parser: argparse.ArgumentParser) -> None: