diff --git a/src/map/map.cpp b/src/map/map.cpp index fcbfc37b..fde95e08 100644 --- a/src/map/map.cpp +++ b/src/map/map.cpp @@ -4,6 +4,7 @@ #define SAMPLES 100 +#define DELTA 1e-6 static void growLeft(const Coordinates &c, RectC &rect) { @@ -55,6 +56,11 @@ RectC Map::llBounds(const Projection &proj) growRight(xy2ll(QPointF(b.right(), y)), rect); } + if (rect.right() <= -180.0 + DELTA) + rect.setRight(180.0); + if (rect.left() >= 180.0 - DELTA) + rect.setLeft(-180.0); + return rect; }