diff --git a/src/map/mapsforge/mapdata.cpp b/src/map/mapsforge/mapdata.cpp index 64fd1b4c..230067ba 100644 --- a/src/map/mapsforge/mapdata.cpp +++ b/src/map/mapsforge/mapdata.cpp @@ -377,6 +377,7 @@ bool MapData::readHeader() _bounds = RectC(Coordinates(MD(minLon), MD(maxLat)), Coordinates(MD(maxLon), MD(minLat))); + _bounds &= OSM::BOUNDS; return true; } diff --git a/src/map/osm.cpp b/src/map/osm.cpp index b8e08f01..9d946fb8 100644 --- a/src/map/osm.cpp +++ b/src/map/osm.cpp @@ -22,8 +22,8 @@ Coordinates OSM::m2ll(const QPointF &p) QPoint OSM::mercator2tile(const QPointF &m, int zoom) { - return QPoint(qFloor((m.x() + 180.0) / 360.0 * (1<