-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Bugfix/nearbby zoomin #2018
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bugfix/nearbby zoomin #2018
Conversation
* Increased the default zoom level in nearby to 12 so that user doesnot have to zoom in to see nearby places
Codecov Report
@@ Coverage Diff @@
## 2.9-release #2018 +/- ##
==============================================
+ Coverage 4.13% 4.15% +0.02%
==============================================
Files 223 223
Lines 11227 11169 -58
Branches 1032 1017 -15
==============================================
Hits 464 464
+ Misses 10728 10670 -58
Partials 35 35
Continue to review full report at Codecov.
|
@ashishkumar468 I tested this on an API 26 Samsung Galaxy s7 device. The zoom level looks appropriate when loading Nearby, well done! :) As mentioned at #1987 though, we need to handle cases where the List button is tapped as well. In your PR currently, when you tap the List button, it centers the map on an entirely wrong location (with no pins), AND at the wrong zoom level. When you go back to map, the zoom level is wrong (too zoomed out) again. So:
|
@misaochan Just to make sure I am headed in the right direction, the zoom level of the map should not be affected by the opening/closing of the bottom sheet (and remain at its default zoom level, which is currently 14), right ? |
I couldn't follow this issue very close but according to my tests
Yes,current location marker is always visible
When list is extended, zoom level changes. But I think there is no way to calculate it, at least I couldn't find. When list is expanded, it covers 3/4 of whole page. So we simply calculate window rates and focus camera accordingly (we shift target parameter by two constants one for portrait one for landscape ).
When zoom changes according to users preferences, I don't know a way to calculate these target shifting constants by considering screen size too. So I think this PR does its best. |
Thanks @neslihanturan . What I have tried to achieve is that, irrespective of the list, the zoom level should not change. It is set to default to 14 and it is supposed to remain the same, or to that which user has explicitly set it to be, irrespective of the bottom sheet expand/collapse state. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
Works well for me. There is indeed the disadvantage of the user not being able to see their position with the list maximized, but I think that is the lesser evil by far, since it's unlikely that anyone will try to navigate with list maximized. Thanks @ashishkumar468 . :) |
Description (required)
Nearby is currently zoomed out to a level where the user has to zoom in every time he uses nearby. Whenever the user starts Nearby, the map should be zoomed in to a reasonable distance(which is mapped to zoom level)
Fixes #1987 { Start Nearby map zoomed in }
What changes did you make and why?
Increased the zoom level to 12 which was 11 before
Tests performed (required)
Tested {build variant, ProdDebug} on {One Plus 1} with API level {26}.
**Screenshots showing what changed (optional - for UI change