Fix zooming issues

This commit is contained in:
Victor Shcherb 2012-10-27 19:31:26 +02:00
parent 95f489df4d
commit a4524605d0

View file

@ -312,9 +312,9 @@ public class MapControlsLayer extends OsmandMapLayer {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
if (view.isZooming()) { if (view.isZooming()) {
activity.changeZoom(view.getFloatZoom() + 2 * ZOOM_DELTA); activity.changeZoom(Math.round(view.getFloatZoom() + 2 * ZOOM_DELTA));
} else { } else {
activity.changeZoom(view.getFloatZoom() + 1 * ZOOM_DELTA); activity.changeZoom(Math.round(view.getFloatZoom() + 1 * ZOOM_DELTA));
} }
} }
@ -323,7 +323,7 @@ public class MapControlsLayer extends OsmandMapLayer {
zoomOutButton.setOnClickListener(new View.OnClickListener() { zoomOutButton.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
activity.changeZoom(view.getFloatZoom() - 1 * ZOOM_DELTA); activity.changeZoom(Math.round(view.getFloatZoom() - 1 * ZOOM_DELTA));
} }
}); });
} }