From 7a633efde12db70bd4c897c0d27a41516ffb0c02 Mon Sep 17 00:00:00 2001 From: savsch Date: Fri, 20 Dec 2024 14:24:53 +0530 Subject: [PATCH] Nearby pins now load starting from the center Fixes #6049 --- .../nrw/commons/nearby/fragments/NearbyParentFragment.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/fr/free/nrw/commons/nearby/fragments/NearbyParentFragment.java b/app/src/main/java/fr/free/nrw/commons/nearby/fragments/NearbyParentFragment.java index c452406c7c..7b4ed12e53 100644 --- a/app/src/main/java/fr/free/nrw/commons/nearby/fragments/NearbyParentFragment.java +++ b/app/src/main/java/fr/free/nrw/commons/nearby/fragments/NearbyParentFragment.java @@ -1386,8 +1386,7 @@ private void populatePlacesForCurrentLocation( setProgressBarVisibility(false); presenter.lockUnlockNearby(false); } else { - updateMapMarkers(nearbyPlacesInfo.placeList, nearbyPlacesInfo.currentLatLng, - true); + updateMapMarkers(nearbyPlacesInfo.placeList, searchLatLng, true); lastFocusLocation = searchLatLng; lastMapFocus = new GeoPoint(searchLatLng.getLatitude(), searchLatLng.getLongitude()); @@ -1430,8 +1429,7 @@ private void populatePlacesForAnotherLocation( // curLatLng is used to calculate distance from the current location to the place // and distance is later on populated to the place - updateMapMarkers(nearbyPlacesInfo.placeList, nearbyPlacesInfo.currentLatLng, - false); + updateMapMarkers(nearbyPlacesInfo.placeList, searchLatLng, false); lastMapFocus = new GeoPoint(searchLatLng.getLatitude(), searchLatLng.getLongitude()); stopQuery();