Issue 456. Fix zoom in
This commit is contained in:
parent
a4fdcffdc6
commit
9b1f273abd
2 changed files with 7 additions and 3 deletions
|
@ -236,11 +236,10 @@ public class AnimateDraggingMapThread {
|
||||||
|
|
||||||
public void startZooming(final int zoomEnd, final boolean notifyListener){
|
public void startZooming(final int zoomEnd, final boolean notifyListener){
|
||||||
final float animationTime = ZOOM_ANIMATION_TIME;
|
final float animationTime = ZOOM_ANIMATION_TIME;
|
||||||
final int zoomStart = tileView.getZoom();
|
|
||||||
|
|
||||||
startThreadAnimating(new Runnable(){
|
startThreadAnimating(new Runnable(){
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
|
final int zoomStart = tileView.getZoom();
|
||||||
setTargetValues(zoomEnd, tileView.getLatitude(), tileView.getLongitude());
|
setTargetValues(zoomEnd, tileView.getLatitude(), tileView.getLongitude());
|
||||||
animatingZoomInThread(zoomStart, zoomEnd, animationTime, notifyListener);
|
animatingZoomInThread(zoomStart, zoomEnd, animationTime, notifyListener);
|
||||||
pendingRotateAnimation();
|
pendingRotateAnimation();
|
||||||
|
|
|
@ -92,8 +92,13 @@ public class MapControlsLayer implements OsmandMapLayer {
|
||||||
zoomInButton.setOnClickListener(new View.OnClickListener() {
|
zoomInButton.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
|
if(view.isZooming()){
|
||||||
|
activity.changeZoom(view.getZoom() + 2);
|
||||||
|
} else {
|
||||||
activity.changeZoom(view.getZoom() + 1);
|
activity.changeZoom(view.getZoom() + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
backToMenuButton.setOnClickListener(new View.OnClickListener() {
|
backToMenuButton.setOnClickListener(new View.OnClickListener() {
|
||||||
|
|
Loading…
Reference in a new issue