Authored by Quazie

Fixing issue 71 with Vladimir's patch

... ... @@ -139,10 +139,12 @@ enum {
- (void)moveBy: (CGSize) delta;
- (void)zoomByFactor: (float) zoomFactor near:(CGPoint) center;
- (void)zoomInToNextNativeZoomAt:(CGPoint) pivot animated:(BOOL) animated;
- (void)zoomOutToNextNativeZoomAt:(CGPoint) pivot animated:(BOOL) animated;
- (void)zoomByFactor: (float) zoomFactor near:(CGPoint) center animated:(BOOL) animated;
- (void)zoomByFactor: (float) zoomFactor near:(CGPoint) center animated:(BOOL) animated withCallback:(id<RMMapContentsAnimationCallback>)callback;
- (void)zoomInToNextNativeZoomAt:(CGPoint) pivot;
- (void)zoomOutToNextNativeZoomAt:(CGPoint) pivot;
- (float)adjustZoomForBoundingMask:(float)zoomFactor;
- (void)adjustMapPlacementWithScale:(float)aScale;
- (void)setZoomBounds:(float)aMinZoom maxZoom:(float)aMaxZoom;
... ...
... ... @@ -414,6 +414,23 @@
}
}
- (void)zoomOutToNextNativeZoomAt:(CGPoint) pivot animated:(BOOL) animated {
// Calculate rounded zoom
float newZoom = roundf([self zoom] - 1);
if (newZoom <= [self minZoom])
return;
else {
float factor = exp2f(newZoom - [self zoom]);
[self zoomByFactor:factor near:pivot animated:animated];
}
}
- (void)zoomOutToNextNativeZoomAt:(CGPoint) pivot {
[self zoomOutToNextNativeZoomAt: pivot animated: FALSE];
}
- (void) drawRect: (CGRect) aRect
{
[renderer drawRect:aRect];
... ...