1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-28 05:34:47 +01:00

Remove the zoom offset hack

Now that we are back to the map data defined tile size, it makes no sense any
more. Additionaly it crashes with world maps as zoom 0 becomes -1...
This commit is contained in:
Martin Tůma 2024-04-18 20:35:31 +02:00
parent 089ccfde71
commit 31cd65f15e

View File

@ -23,17 +23,13 @@ namespace Mapsforge {
class RasterTile class RasterTile
{ {
public: public:
/* Most Mapsforge themes expect the zoom levels to be offset by one from
the standard OSM zoom levels! We decrease the zoom level internaly
here when initializing _zoom and return the propper (increased) value
back in zoom() */
RasterTile(const Projection &proj, const Transform &transform, RasterTile(const Projection &proj, const Transform &transform,
const Style *style, MapData *data, int zoom, const QRect &rect, const Style *style, MapData *data, int zoom, const QRect &rect,
qreal ratio, bool hillShading) qreal ratio, bool hillShading)
: _proj(proj), _transform(transform), _style(style), _data(data), : _proj(proj), _transform(transform), _style(style), _data(data),
_zoom(zoom - 1), _rect(rect), _ratio(ratio), _hillShading(hillShading) {} _zoom(zoom), _rect(rect), _ratio(ratio), _hillShading(hillShading) {}
int zoom() const {return _zoom + 1;} int zoom() const {return _zoom;}
QPoint xy() const {return _rect.topLeft();} QPoint xy() const {return _rect.topLeft();}
const QPixmap &pixmap() const {return _pixmap;} const QPixmap &pixmap() const {return _pixmap;}