From 4c67ef82095b0918a889f41e9f781d18c91b5108 Mon Sep 17 00:00:00 2001 From: vshcherb Date: Fri, 1 Nov 2013 09:47:05 +0100 Subject: [PATCH] Fix critical issue of 208% --- OsmAnd-java/src/net/osmand/util/MapUtils.java | 2 +- OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/OsmAnd-java/src/net/osmand/util/MapUtils.java b/OsmAnd-java/src/net/osmand/util/MapUtils.java index d4cfdaa1ac..9ce21d2044 100644 --- a/OsmAnd-java/src/net/osmand/util/MapUtils.java +++ b/OsmAnd-java/src/net/osmand/util/MapUtils.java @@ -217,7 +217,7 @@ public class MapUtils { } public static double getPowZoom(float zoom){ - if(zoom >= 0 && zoom - Math.floor(zoom) < 0.05f){ + if(zoom >= 0 && zoom - Math.floor(zoom) < 0.001f){ return 1 << ((int)zoom); } else { return Math.pow(2, zoom); diff --git a/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java b/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java index ebaa3248c2..fb0df7ff24 100644 --- a/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java +++ b/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java @@ -1272,7 +1272,7 @@ public class MapActivityActions implements DialogProvider { } }).reg(); final OsmAndLocationProvider loc = app.getLocationProvider(); - if (app.getTargetPointsHelper().getPointToNavigate() != null) { + if (app.getTargetPointsHelper().getPointToNavigate() != null || loc.getLocationSimulation().isRouteAnimating()) { optionsMenuHelper.item(loc.getLocationSimulation().isRouteAnimating() ? R.string.animate_route_off : R.string.animate_route).icons(R.drawable.ic_action_play_dark, R.drawable.ic_action_play_light )