From 31cd65f15e45ef86f40ae22c54794f778a417c40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Thu, 18 Apr 2024 20:35:31 +0200 Subject: [PATCH] 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... --- src/map/mapsforge/rastertile.h | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/map/mapsforge/rastertile.h b/src/map/mapsforge/rastertile.h index e1feb852..e0a33028 100644 --- a/src/map/mapsforge/rastertile.h +++ b/src/map/mapsforge/rastertile.h @@ -23,17 +23,13 @@ namespace Mapsforge { class RasterTile { 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, const Style *style, MapData *data, int zoom, const QRect &rect, qreal ratio, bool hillShading) : _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();} const QPixmap &pixmap() const {return _pixmap;}