Fix border type switching
This commit is contained in:
parent
fbec2abd19
commit
13b6b74e13
1 changed files with 3 additions and 3 deletions
|
@ -14,7 +14,7 @@ import java.util.List;
|
||||||
|
|
||||||
public class RouteGeometryWayDrawer extends GeometryWayDrawer<RouteGeometryWayContext> {
|
public class RouteGeometryWayDrawer extends GeometryWayDrawer<RouteGeometryWayContext> {
|
||||||
|
|
||||||
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;
|
private final boolean drawBorder;
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ public class RouteGeometryWayDrawer extends GeometryWayDrawer<RouteGeometryWayCo
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void drawFullBorder(Canvas canvas, int zoom, List<Pair<Path, GeometryWayStyle<?>>> paths) {
|
protected void drawFullBorder(Canvas canvas, int zoom, List<Pair<Path, GeometryWayStyle<?>>> paths) {
|
||||||
if (drawBorder && zoom > BORDER_TYPE_ZOOM_THRESHOLD) {
|
if (drawBorder && zoom < BORDER_TYPE_ZOOM_THRESHOLD) {
|
||||||
Paint borderPaint = getContext().getAttrs().shadowPaint;
|
Paint borderPaint = getContext().getAttrs().shadowPaint;
|
||||||
Path fullPath = new Path();
|
Path fullPath = new Path();
|
||||||
for (Pair<Path, GeometryWayStyle<?>> path : paths) {
|
for (Pair<Path, GeometryWayStyle<?>> path : paths) {
|
||||||
|
@ -50,7 +50,7 @@ public class RouteGeometryWayDrawer extends GeometryWayDrawer<RouteGeometryWayCo
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void drawSegmentBorder(Canvas canvas, int zoom, Path path, GeometryWayStyle<?> style) {
|
protected void drawSegmentBorder(Canvas canvas, int zoom, Path path, GeometryWayStyle<?> style) {
|
||||||
if (drawBorder && zoom < BORDER_TYPE_ZOOM_THRESHOLD) {
|
if (drawBorder && zoom >= BORDER_TYPE_ZOOM_THRESHOLD) {
|
||||||
canvas.drawPath(path, getContext().getAttrs().shadowPaint);
|
canvas.drawPath(path, getContext().getAttrs().shadowPaint);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue