-
Notifications
You must be signed in to change notification settings - Fork 318
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
Reinvent the course tracking wheel #402
Merged
Merged
Changes from 34 commits
Commits
Show all changes
44 commits
Select commit
Hold shift + click to select a range
b5315f3
Reinvented the course tracking wheel
1ec5 c97b480
Add user puck
frederoni d431b5f
wip follow with course
frederoni 22715d7
Use target point and animate if plugged in
frederoni 49e74c2
Tweak user puck
frederoni 8ac0731
Made cameras more consistent
1ec5 f696bb1
Avoid tracking while previewing a future step
1ec5 084a116
Disable course tracking on pan or rotation
1ec5 7805a62
Removed dependency on map SDK user tracking mode
1ec5 c4abe7b
Fixed transitions to and from overview mode
1ec5 da0c3b5
Remove unused methods
frederoni 491a6b1
Tweak initial flyTo
frederoni 53c8338
Hide resume initially
frederoni 8310cef
Use location from route controller
frederoni 6ad004a
Clean up
frederoni adb7199
Cap frame rate when unplugged
frederoni b5e544d
Stop interrupting manual camera position and show recenter when needed
frederoni 1027fc4
Added a new user puck
frederoni d5a6375
Clean up user puck
frederoni 7c8ffd3
Remove unused and optimize
frederoni 869d478
Remove debug object
frederoni 39d3e10
Fix initial flyTo and resume tracking animation
frederoni 7ca930a
Fixed direction when tracking course
frederoni bad1e30
Fix tracking for zoom and fling gesture
frederoni 5872cbe
Moved battery monitoring to NavigationMapView
1ec5 98f130b
NavigationViewController always has a NavigationMapView
1ec5 fb12945
Fix empty method body in category
frederoni 2af573f
Shrink puck in overview mode
1ec5 0903d0a
Disable throttling
frederoni 2003877
Add deg->rad
frederoni 7de007d
remove unnecessary hasFinishedLoadingMap
c1f5926
Styleable user puck
frederoni 8675bed
Configurable user course view positioning
1ec5 1761173
Fix drifting when changing orientation
frederoni eba531e
set tracksUserCourse = true when swiping to current step
1d086af
Re-enable location snapping
frederoni 1c9a575
Remove excessive disabling of tracksUserCourse
frederoni 429aac9
Move gesture changed to cover all recognizers
frederoni 9fe6b28
remove example
068741e
Hold altitude user changes
134df48
Set on end
a4063b8
Override anchor point and capture altitude after tap recognizers anim…
frederoni 51ae745
Don't update tracksUserCourse when changing page
frederoni 61f9695
Re-enable tracksUserCourse when swiping to current step
frederoni 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#pragma once | ||
|
||
#import "MGLMapView+CustomAdditions.h" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#import <Mapbox/Mapbox.h> | ||
|
||
@interface MGLMapView (CustomAdditions) <CLLocationManagerDelegate> | ||
|
||
// FIXME: This will be removed once https://github.com/mapbox/mapbox-gl-native/issues/6867 is implemented | ||
- (void)locationManager:(CLLocationManager *)manager didUpdateLocations:(NSArray<CLLocation *> *)locations; | ||
|
||
@property (nonatomic, readonly) CLLocationManager *locationManager; | ||
|
||
@end | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#import "MGLMapView+CustomAdditions.h" | ||
|
||
#pragma clang diagnostic push | ||
#pragma clang diagnostic ignored "-Wincomplete-implementation" | ||
// Supressing compiler warning until https://github.com/mapbox/mapbox-gl-native/issues/6867 is implemented | ||
@implementation MGLMapView (CustomAdditions) | ||
#pragma clang diagnostic pop | ||
|
||
@dynamic locationManager; | ||
|
||
@end |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
import Foundation | ||
import CoreLocation | ||
#if os(iOS) | ||
import UIKit | ||
#endif | ||
|
||
#if os(iOS) | ||
import UIKit | ||
|
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
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
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
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
Oops, something went wrong.
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.
@frederoni is this file necessary?
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.
Unfortunately, it's necessary until we rewrite the custom example to use something like the new course tracking view. We could reuse this implementation but having the custom example rely on MapboxNavigation contradicts the whole purpose of the custom navigation example.
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.
@frederoni so if we were to merge this now, in what case is it necessary for developers to add this file?
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 only need it for simulating location updates in the custom example/MapboxCoreNavigation. Same as prior to this PR but we moved it from
MGLMapView+MGLNavigationAdditions.h
to+CustomAdditions
.