# Conflicts:
#	app/src/main/java/com/android_app/matan/ara/sagi/thesocialnotework/GmapFragment.java
This commit is contained in:
Aran Zaiger 2016-07-10 15:29:14 +03:00
parent 555805b320
commit fc0b4dda2c

View file

@ -70,7 +70,7 @@ public class GmapFragment extends Fragment implements OnMapReadyCallback {
private GoogleMap mMap; private GoogleMap mMap;
private GPSUtils gpsUtils; private GPSUtils gpsUtils;
private MainActivity mainActivity; private MainActivity mainActivity;
private final int MAX_ZOOM = 16, MIN_ZOOM = 9, DEFAULT_ZOOM = 12; private final int MAX_ZOOM = 16, MIN_ZOOM = 8, DEFAULT_ZOOM = 12;
private HashMap<Marker, Note> eventMarkerMap; private HashMap<Marker, Note> eventMarkerMap;
private ImageButton dateFilter; private ImageButton dateFilter;
private ImageButton locationFilter; private ImageButton locationFilter;
@ -258,6 +258,7 @@ public class GmapFragment extends Fragment implements OnMapReadyCallback {
if (ActivityCompat.checkSelfPermission(mainActivity, android.Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(mainActivity, android.Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) { if (ActivityCompat.checkSelfPermission(mainActivity, android.Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(mainActivity, android.Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {
return; return;
} }
updateLocationCircle();
mMap.setMyLocationEnabled(true); mMap.setMyLocationEnabled(true);
mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(userLocation, DEFAULT_ZOOM)); mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(userLocation, DEFAULT_ZOOM));
@ -563,6 +564,7 @@ public class GmapFragment extends Fragment implements OnMapReadyCallback {
map_medium_filter.setBackgroundResource(android.R.drawable.btn_default); map_medium_filter.setBackgroundResource(android.R.drawable.btn_default);
map_large_filter.setBackgroundColor(Utils.filterColor); map_large_filter.setBackgroundColor(Utils.filterColor);
} }
updateLocationCircle();
} else { } else {
locationFilter.setBackgroundResource(android.R.drawable.btn_default); locationFilter.setBackgroundResource(android.R.drawable.btn_default);
} }
@ -596,6 +598,7 @@ public class GmapFragment extends Fragment implements OnMapReadyCallback {
} }
Log.d(TAG, "updateShowedNotes: ======= markers presented: "+ presentedNotes.size()+"============="); Log.d(TAG, "updateShowedNotes: ======= markers presented: "+ presentedNotes.size()+"=============");
mMap.clear(); mMap.clear();
updateLocationCircle();
new getMarkersFromNotes(mMap, eventMarkerMap).execute(presentedNotes); new getMarkersFromNotes(mMap, eventMarkerMap).execute(presentedNotes);
} }