From 13b6b74e132d2d3d5a44fb6c0481866d6d9c9e7c Mon Sep 17 00:00:00 2001 From: cepprice Date: Sun, 18 Apr 2021 14:43:07 +0500 Subject: [PATCH] Fix border type switching --- .../plus/views/layers/geometry/RouteGeometryWayDrawer.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/views/layers/geometry/RouteGeometryWayDrawer.java b/OsmAnd/src/net/osmand/plus/views/layers/geometry/RouteGeometryWayDrawer.java index 746283a180..1f613aecd5 100644 --- a/OsmAnd/src/net/osmand/plus/views/layers/geometry/RouteGeometryWayDrawer.java +++ b/OsmAnd/src/net/osmand/plus/views/layers/geometry/RouteGeometryWayDrawer.java @@ -14,7 +14,7 @@ import java.util.List; public class RouteGeometryWayDrawer extends GeometryWayDrawer { - private final int BORDER_TYPE_ZOOM_THRESHOLD = MapTileLayer.DEFAULT_MIN_ZOOM; + private static final int BORDER_TYPE_ZOOM_THRESHOLD = MapTileLayer.DEFAULT_MAX_ZOOM + MapTileLayer.OVERZOOM_IN; private final boolean drawBorder; @@ -25,7 +25,7 @@ public class RouteGeometryWayDrawer extends GeometryWayDrawer>> paths) { - if (drawBorder && zoom > BORDER_TYPE_ZOOM_THRESHOLD) { + if (drawBorder && zoom < BORDER_TYPE_ZOOM_THRESHOLD) { Paint borderPaint = getContext().getAttrs().shadowPaint; Path fullPath = new Path(); for (Pair> path : paths) { @@ -50,7 +50,7 @@ public class RouteGeometryWayDrawer extends GeometryWayDrawer style) { - if (drawBorder && zoom < BORDER_TYPE_ZOOM_THRESHOLD) { + if (drawBorder && zoom >= BORDER_TYPE_ZOOM_THRESHOLD) { canvas.drawPath(path, getContext().getAttrs().shadowPaint); } }