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,
@Override
public void onLocationAvailability(LocationAvailability locationAvailability) {
if (!locationAvailability.isLocationAvailable() && campusMapView.isAddedMarker(user)) {
campusMapView.removeAddedMarker(user);
if (campusMapView.isAddedMarker(user)) {
user.setGroupIndex(!locationAvailability.isLocationAvailable() ? -9 : -10);
campusMapView.invalidate();
}
super.onLocationAvailability(locationAvailability);
......
......@@ -78,8 +78,8 @@ public class Marker {
}
public static int getColor(int group) {
if (group == -10) {
return -10;
if (group < -8) {
return group;
}
Integer[] yellowGroup = new Integer[]{HOSTELS};
......
......@@ -571,9 +571,9 @@ public class CampusMapView extends SubsamplingScaleImageView {
markerBitmap = grayMarker;
if (isAddedMarker(marker))
markerBitmap = grayLockedMarker;
} else if (color == -10) {
} else if (color < -8) {
if (isAddedMarker(marker))
markerBitmap = userMarker;
markerBitmap = color == -10 ? userMarker : grayMarker;
}
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