diff --git a/map_machine/element/element.py b/map_machine/element/element.py index f7c7fa5..180c03e 100644 --- a/map_machine/element/element.py +++ b/map_machine/element/element.py @@ -13,9 +13,13 @@ def draw_node(tags: Tags, path: Path): grid.draw(path) -def draw_way(): +def draw_way(tags: Tags, path: Path): """Draw way.""" - pass + grid: Grid = Grid(show_credit=False, margin=3.5) + node_1: OSMNode = grid.add_node({}, 0, 0) + node_2: OSMNode = grid.add_node({}, 1, 1) + grid.add_way(tags, [node_1, node_2]) + grid.draw(path) def draw_area(tags: Tags, path: Path): @@ -38,7 +42,9 @@ def draw_element(options: argparse.Namespace): tags_description: Tags = { x.split("=")[0]: x.split("=")[1] for x in options.tags.split(",") } - if options.type == "area": - draw_area(tags_description, Path(options.output_file)) - elif options.type == "node": + if options.type == "node": draw_node(tags_description, Path(options.output_file)) + elif options.type == "way": + draw_way(tags_description, Path(options.output_file)) + elif options.type == "area": + draw_area(tags_description, Path(options.output_file))