mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-31 23:03:54 +01:00
Fixed issue with pin loading on the first launch
This commit is contained in:
parent
2251c62355
commit
6fed9f4ed7
1 changed files with 2 additions and 2 deletions
|
|
@ -1035,7 +1035,7 @@ public class NearbyParentFragment extends CommonsDaggerSupportFragment
|
|||
// When the nearby fragment is opened immediately upon app launch, the {screenTopRightLatLng}
|
||||
// and {screenBottomLeftLatLng} variables return {LatLng(0.0,0.0)} as output.
|
||||
// To address this issue, A small delta value {delta = 0.02} is used to adjust the latitude
|
||||
// and longitude values for {ZOOM_LEVEL = 14f}.
|
||||
// and longitude values for {ZOOM_LEVEL = 15f}.
|
||||
// This adjustment helps in calculating the east and west corner LatLng accurately.
|
||||
// Note: This only happens when the nearby fragment is opened immediately upon app launch,
|
||||
// otherwise {screenTopRightLatLng} and {screenBottomLeftLatLng} are used to determine
|
||||
|
|
@ -1043,7 +1043,7 @@ public class NearbyParentFragment extends CommonsDaggerSupportFragment
|
|||
if (screenTopRightLatLng.getLatitude() == 0.0 && screenTopRightLatLng.getLongitude() == 0.0
|
||||
&& screenBottomLeftLatLng.getLatitude() == 0.0
|
||||
&& screenBottomLeftLatLng.getLongitude() == 0.0) {
|
||||
final double delta = 0.02;
|
||||
final double delta = 0.009;
|
||||
final double westCornerLat = currentLatLng.getLatitude() - delta;
|
||||
final double westCornerLong = currentLatLng.getLongitude() - delta;
|
||||
final double eastCornerLat = currentLatLng.getLatitude() + delta;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue