-
Notifications
You must be signed in to change notification settings - Fork 11
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
PB-154: Geolocation device orientation (gyroscope) - #minor #1022
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
github-actions
bot
changed the title
PB-154: Geolocation device orientation (gyroscope)
PB-154: Geolocation device orientation (gyroscope) - #minor
Aug 7, 2024
web-mapviewer Run #3168
Run Properties:
|
Project |
web-mapviewer
|
Branch Review |
feat-PB-154-geolocation-orientation
|
Run status |
Passed #3168
|
Run duration | 05m 06s |
Commit |
3b52e3214e: PB-154: Adapted the debug backend tool look
|
Committer | Brice Schaffner |
View all properties for this run ↗︎ |
Test results | |
---|---|
Failures |
0
|
Flaky |
0
|
Pending |
21
|
Skipped |
0
|
Passing |
210
|
View all changes introduced in this branch ↗︎ |
ltshb
commented
Aug 7, 2024
ltshb
force-pushed
the
feat-PB-154-geolocation-orientation
branch
7 times, most recently
from
August 12, 2024 09:50
f849e0b
to
565fa25
Compare
ltshb
force-pushed
the
feat-PB-154-geolocation-orientation
branch
2 times, most recently
from
August 13, 2024 05:46
30a20ff
to
91fd823
Compare
As discussed with @ltshb, Absolute Listener with Alpha Value is OK on |
ltshb
force-pushed
the
feat-PB-154-geolocation-orientation
branch
from
August 26, 2024 05:18
cb0b68c
to
b9b50b6
Compare
ltshb
force-pushed
the
feat-PB-154-geolocation-orientation
branch
2 times, most recently
from
August 27, 2024 18:23
993aca2
to
f296c97
Compare
pakb
approved these changes
Aug 30, 2024
Make it more concise in order to use it also on smaller screen. For device orientation we will need a new button, so we need to make some room to avoid having the button off screen. Also removed useless 3d debugs, they are now in the regular menu.
The initial geolocation might be invalid which creates a crash error, so we avoid it.
Not all devices uses the same orientation events, therefore added both.
Due to the moveend event that set the center when the user moved the map by pressing/touching the map and a geolocation arrived during the move operation the disabled tracking did not work as expected and the map was re-centered canceling the move action of the user. So now we are listening to the pointerdrag that happens as soon as we start to drag and not when dragging is finished. Also moveend happened not only when the using moved the map, but has soon as the map moved even programmatically.
When the goelocation tracking is disabled a dot in the icon is added in order to provide a user feedback on how to re-center the map
This improved reactivity and performance
We had some case with infinite loop due to heading wrapping in 3D where cesium reported heading 360 which was wrapped to 0 and triggered a dispatch and a fly to which reported then back 360....
This kind of annoying especially if you want to recenter but keep your zoom.
Re-centering on position in 3D is more complex as in 2d because the of the camera. If the pitch is not 90° then we need to compute the camera position in order to have the position centered on the screen. For this moment we don't do this computation and simply don't re-center the view on geolocation by disabling geolocation tracking in 3D.
and move compass feedback to geolocation button component, linking them together visually on the UI
Keep the compass on in auto-rotation even if the map is north.
Auto rotation rotate the map using the geolocation as center and it doesn't make sense to rotate if the location is not centered (this is also the same behavior as on the swisstopo app)
ltshb
force-pushed
the
feat-PB-154-geolocation-orientation
branch
from
September 2, 2024 05:06
e0511cf
to
3b52e32
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR replaced the initial work of #965
Testing slack canvas: https://swisstopo.slack.com/docs/TG623EKS6/F07GV0DQS7L
It also fixes some bugs related to goelocation see commits.
Because of some issues with some android devices (mostly samsung devices), the device orientation is only enabled on device where we can be sure that it works well, meaning Iphone and Pixel phone.
Test link
Test link