diff --git a/src/map/imgmap.cpp b/src/map/imgmap.cpp index 2db62d47..fc8dc4aa 100644 --- a/src/map/imgmap.cpp +++ b/src/map/imgmap.cpp @@ -141,6 +141,12 @@ int IMGMap::zoomOut() return _zoom; } +void IMGMap::setZoom(int zoom) +{ + _zoom = zoom; + updateTransform(); +} + void IMGMap::updateTransform() { double scale = (2.0 * M_PI * WGS84_RADIUS) / (1<<_zoom);; diff --git a/src/map/imgmap.h b/src/map/imgmap.h index b3c96f17..0c46419e 100644 --- a/src/map/imgmap.h +++ b/src/map/imgmap.h @@ -21,7 +21,7 @@ public: QRectF bounds(); virtual int zoom() const {return _zoom;} - virtual void setZoom(int zoom) {_zoom = zoom;} + virtual void setZoom(int zoom); virtual int zoomFit(const QSize &, const RectC &); virtual int zoomIn(); virtual int zoomOut();