Improved zoom level and fixed the pins not loading from the center

This commit is contained in:
Kanahia 2024-05-30 09:37:56 +05:30
parent 79b25734ad
commit ac3a2d6f49

View file

@ -174,7 +174,7 @@ public class NearbyParentFragment extends CommonsDaggerSupportFragment
private Animation fab_close;
private Animation fab_open;
private Animation rotate_forward;
private static final float ZOOM_LEVEL = 14f;
private static final float ZOOM_LEVEL = 15f;
private final String NETWORK_INTENT_ACTION = "android.net.conn.CONNECTIVITY_CHANGE";
private BroadcastReceiver broadcastReceiver;
private boolean isNetworkErrorOccurred;
@ -1441,7 +1441,7 @@ public class NearbyParentFragment extends CommonsDaggerSupportFragment
updatedLatLng = curLatLng;
updatedPlaceList = new ArrayList<>(placeList);
if (VERSION.SDK_INT >= VERSION_CODES.N) {
Collections.sort(places, Comparator.comparingDouble(place -> place.getDistanceInDouble(curLatLng)));
Collections.sort(places, Comparator.comparingDouble(place -> place.getDistanceInDouble(getMapFocus())));
}
stopQuery = false;
processBatchesSequentially(places, batchSize, updatedPlaceList, curLatLng, 0);