From 9b1f273abd7afb121b40739b85b04fb94c68db73 Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Mon, 13 Jun 2011 23:02:17 +0200 Subject: [PATCH] Issue 456. Fix zoom in --- .../net/osmand/plus/views/AnimateDraggingMapThread.java | 3 +-- OsmAnd/src/net/osmand/plus/views/MapControlsLayer.java | 7 ++++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/views/AnimateDraggingMapThread.java b/OsmAnd/src/net/osmand/plus/views/AnimateDraggingMapThread.java index a154bcdceb..0c06ac67d6 100644 --- a/OsmAnd/src/net/osmand/plus/views/AnimateDraggingMapThread.java +++ b/OsmAnd/src/net/osmand/plus/views/AnimateDraggingMapThread.java @@ -236,11 +236,10 @@ public class AnimateDraggingMapThread { public void startZooming(final int zoomEnd, final boolean notifyListener){ final float animationTime = ZOOM_ANIMATION_TIME; - final int zoomStart = tileView.getZoom(); - startThreadAnimating(new Runnable(){ @Override public void run() { + final int zoomStart = tileView.getZoom(); setTargetValues(zoomEnd, tileView.getLatitude(), tileView.getLongitude()); animatingZoomInThread(zoomStart, zoomEnd, animationTime, notifyListener); pendingRotateAnimation(); diff --git a/OsmAnd/src/net/osmand/plus/views/MapControlsLayer.java b/OsmAnd/src/net/osmand/plus/views/MapControlsLayer.java index 200714b8a3..a413afba8a 100644 --- a/OsmAnd/src/net/osmand/plus/views/MapControlsLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/MapControlsLayer.java @@ -92,7 +92,12 @@ public class MapControlsLayer implements OsmandMapLayer { zoomInButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { - activity.changeZoom(view.getZoom() + 1); + if(view.isZooming()){ + activity.changeZoom(view.getZoom() + 2); + } else { + activity.changeZoom(view.getZoom() + 1); + } + } });