Skip to content

Commit

Permalink
Location renderer: fix indicator minimum size opensciencemap#171
Browse files Browse the repository at this point in the history
  • Loading branch information
devemux86 committed Sep 17, 2016
1 parent bc0bbcb commit 9b460b0
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions vtm/src/org/oscim/renderer/LocationRenderer.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@
import static org.oscim.backend.GLAdapter.gl;

public class LocationRenderer extends LayerRenderer {

private static final long ANIM_RATE = 50;
private static final long INTERVAL = 2000;

private static final float CIRCLE_SIZE = 60;
private static final int SHOW_ACCURACY_ZOOM = 16;

public enum Shader {SHADER_1, SHADER_2}
Expand All @@ -42,11 +47,6 @@ public enum Shader {SHADER_1, SHADER_2}
private int hPhase;
private int hDirection;

private static final float CIRCLE_SIZE = 60;

private static final long ANIM_RATE = 50;
private static final long INTERVAL = 2000;

private final Point mIndicatorPosition = new Point();

private final Point mScreenPoint = new Point();
Expand Down Expand Up @@ -199,8 +199,9 @@ public void render(GLViewport v) {
if (!mLocationIsVisible /* || pos.zoomLevel < SHOW_ACCURACY_ZOOM */) {
//animate(true);
} else {
if (v.pos.zoomLevel >= mShowAccuracyZoom && mRadius > 0)
if (v.pos.zoomLevel >= mShowAccuracyZoom)
radius = (float) (mRadius * v.pos.scale);
radius = Math.max(CIRCLE_SIZE, radius);

viewShed = true;
//animate(false);
Expand Down

0 comments on commit 9b460b0

Please sign in to comment.