diff --git a/lib/xmet/map.py b/lib/xmet/map.py index daec184..4afe4ed 100644 --- a/lib/xmet/map.py +++ b/lib/xmet/map.py @@ -47,8 +47,8 @@ class EquirectMap(): svg.render_layer(cr, None, rect) def screen_to_map(self, x: float, y: float) -> shapely.Point: - lon = self.bounds[3] + (x / self.width) * self.width - lat = self.bounds[0] + (y / self.height) * self.height + lon = (x / self.width) * self.map_width + self.bounds[3] + lat = self.height * self.map_height + self.bounds[2] + (y / self.height) return shapely.Point(lon, lat)