mirror of
https://github.com/tumic0/GPXSee.git
synced 2024-11-24 11:45:53 +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:
parent
089ccfde71
commit
31cd65f15e
@ -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;}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user