temporary timestamp check for removing marker

This commit is contained in:
Adam Domagalski 2018-11-26 23:04:35 +01:00
parent b14052eb21
commit 9b291117ef

View File

@ -403,7 +403,16 @@ public class MapActivity extends BaseActivity
coordsMap.put(id, element); coordsMap.put(id, element);
marker.setPosition(toDestination); marker.setPosition(toDestination);
} else if((System.currentTimeMillis() - coordinate.getTimeStamp()) > (long) 300000) {
// TODO debug logic and remove timestamp removing
// String id = coordinate.getUserId();
Marker markerToRemove = markerHash.get(id);
markerHash.remove(id);
coordsMap.remove(id);
mapboxMap.removeMarker(markerToRemove);
currentCoordsIds.remove(id);
} }
} else { } else {
Log.e(tag, "Marker Added: " + id); Log.e(tag, "Marker Added: " + id);