This repository has been archived by the owner on Aug 8, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Affix user dot on screen in user tracking mode #3589
Merged
Merged
Changes from 1 commit
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
453000a
[ios] Affix user dot on screen in user tracking mode
1ec5 41ce7b2
[ios] Fly to user location
1ec5 51be461
[ios] Leave user location callout open when tracking
1ec5 2519255
[ios] Eliminated jump after flight to first location
1ec5 867e015
[ios] Maintain user tracking mode after orientation change
1ec5 59f2c53
[ios] Keep callout attached to moving user dot
1ec5 35895af
[ios] Keep user dot callout open after user location change
1ec5 a93e7d7
[ios] Non-animated user tracking mode changes
1ec5 07c4c54
[ios] Made user dot position configurable
1ec5 65f6eb2
[ios, osx] Optionally animate content insets change
1ec5 5a00427
[ios] Maintain user tracking, anchor on user dot during zoom, rotate
1ec5 bd46111
[ios] Reset user tracking, respect content inset in resetPosition
1ec5 460b21e
[ios] z14 initially in user tracking mode
1ec5 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
[ios] Fly to user location
Fly to the user location when entering user tracking mode. Keep user location updates from interfering with the initial flight.
- Loading branch information
commit 41ce7b2526ec338a10a1bfcfbee0a30342b2c49a
There are no files selected for viewing
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
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.
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.
This approach seems to be more reliable, and it also works when the map is tilted, something unsupported by the old code, which was ported from the raster SDK, which didn’t support tilting.
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.
Happy that this is simplified! The camera movement is much slicker, too.
One continued quibble is that highly-accurate location fixes zoom in too far and context is lost. This is somewhat mitigated by the camera animation, but perhaps we could also adopt a minimum altitude?
~~We should additionally consider only zooming in if the map's zoom level is relatively low; i.e., Apple Maps doesn't change the altitude/zoom unless the map is zoomed out to ~z8.~~ Strike that, we already do this at <z10.
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.
I'm also seeing this zoom in beyond the accuracy ring, which is unintuitive.
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.
You're right, it does always seem to zoom into z18 for some reason. Perhaps it's because iOS-specific code assumes a field of view of 30 degrees, which is less than what some mbgl calculations assume.
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.
Fixed in dbfc363. I haven’t nailed down exactly what MapKit does, but it does seem to like z14 quite a lot.