From 5484fb3bb8c7b57b6ee34f499e6834682582b4ef Mon Sep 17 00:00:00 2001 From: XANTRONIX Industrial Date: Tue, 25 Mar 2025 14:41:05 -0400 Subject: [PATCH] Add draw_base_map_from_file() --- lib/xmet/map.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/xmet/map.py b/lib/xmet/map.py index 4afe4ed..b94f572 100644 --- a/lib/xmet/map.py +++ b/lib/xmet/map.py @@ -46,6 +46,11 @@ class EquirectMap(): svg.render_layer(cr, None, rect) + def draw_base_map_from_file(self, + cr: cairo.Context, + path: str): + return self.draw_from_file(cr, path, 0, 0, self.width, self.height) + def screen_to_map(self, x: float, y: float) -> shapely.Point: lon = (x / self.width) * self.map_width + self.bounds[3] lat = self.height * self.map_height + self.bounds[2] + (y / self.height)