Add draw_base_map_from_file()

This commit is contained in:
XANTRONIX 2025-03-25 14:41:05 -04:00
parent 10fe96a642
commit 5484fb3bb8

View file

@ -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)