diff --git a/MapboxAndroidSDK/src/main/java/org/fieldpapers/model/FPAtlas.java b/MapboxAndroidSDK/src/main/java/org/fieldpapers/model/FPAtlas.java index 8c645d1..b2c10d8 100644 --- a/MapboxAndroidSDK/src/main/java/org/fieldpapers/model/FPAtlas.java +++ b/MapboxAndroidSDK/src/main/java/org/fieldpapers/model/FPAtlas.java @@ -183,6 +183,7 @@ private void findPage(ILatLng latLng) { } private void noPageFound() { + clearSelectedPathOverlay(); if (activity != null && activity instanceof FPListener) { ((FPListener)activity).onMapCenterPageChangeMessage(null); } @@ -200,10 +201,15 @@ private String pageMessage(FPPage page) { return title() + " " + page.pageNumber(); } - private void setSelectedPathOverlay(FPPage page) { + private void clearSelectedPathOverlay() { if (selectedPathOverlay != null) { selectedPathOverlay.getPaint().setColor(Color.BLACK); + selectedPathOverlay = null; } + } + + private void setSelectedPathOverlay(FPPage page) { + clearSelectedPathOverlay(); PathOverlay pathOverlay = page.pathOverlay(); List overlays = mapView.getOverlays(); diff --git a/MapboxAndroidSDK/src/main/java/org/fieldpapers/renderer/FPOverlay.java b/MapboxAndroidSDK/src/main/java/org/fieldpapers/renderer/FPOverlay.java deleted file mode 100644 index ea48e98..0000000 --- a/MapboxAndroidSDK/src/main/java/org/fieldpapers/renderer/FPOverlay.java +++ /dev/null @@ -1,15 +0,0 @@ -package org.fieldpapers.renderer; - -import android.graphics.Canvas; - -import com.mapbox.mapboxsdk.overlay.Overlay; -import com.mapbox.mapboxsdk.views.MapView; - -public class FPOverlay extends Overlay { - - @Override - protected void draw(Canvas c, MapView osmv, boolean shadow) { - - } - -}