Commit 8981a4fa authored by Varun Patil's avatar Varun Patil

Make marker gray on losing location

parent b3d260b0
...@@ -1149,8 +1149,8 @@ public class MapFragment extends Fragment implements TextWatcher, ...@@ -1149,8 +1149,8 @@ public class MapFragment extends Fragment implements TextWatcher,
@Override @Override
public void onLocationAvailability(LocationAvailability locationAvailability) { public void onLocationAvailability(LocationAvailability locationAvailability) {
if (!locationAvailability.isLocationAvailable() && campusMapView.isAddedMarker(user)) { if (campusMapView.isAddedMarker(user)) {
campusMapView.removeAddedMarker(user); user.setGroupIndex(!locationAvailability.isLocationAvailable() ? -9 : -10);
campusMapView.invalidate(); campusMapView.invalidate();
} }
super.onLocationAvailability(locationAvailability); super.onLocationAvailability(locationAvailability);
......
...@@ -78,8 +78,8 @@ public class Marker { ...@@ -78,8 +78,8 @@ public class Marker {
} }
public static int getColor(int group) { public static int getColor(int group) {
if (group == -10) { if (group < -8) {
return -10; return group;
} }
Integer[] yellowGroup = new Integer[]{HOSTELS}; Integer[] yellowGroup = new Integer[]{HOSTELS};
......
...@@ -571,9 +571,9 @@ public class CampusMapView extends SubsamplingScaleImageView { ...@@ -571,9 +571,9 @@ public class CampusMapView extends SubsamplingScaleImageView {
markerBitmap = grayMarker; markerBitmap = grayMarker;
if (isAddedMarker(marker)) if (isAddedMarker(marker))
markerBitmap = grayLockedMarker; markerBitmap = grayLockedMarker;
} else if (color == -10) { } else if (color < -8) {
if (isAddedMarker(marker)) if (isAddedMarker(marker))
markerBitmap = userMarker; markerBitmap = color == -10 ? userMarker : grayMarker;
} }
if (highlightedMarkerScale != 1.0f && isResultMarker(marker)) { if (highlightedMarkerScale != 1.0f && isResultMarker(marker)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment