Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Add method to set user tracking mode as well as pitch, heading, and zoom in a single animation #8609

Closed
n8chur opened this issue Mar 31, 2017 · 2 comments
Labels
archived Archived because of inactivity iOS Mapbox Maps SDK for iOS navigation For the Mapbox Navigation SDK for Android or iOS or navigation use cases in general

Comments

@n8chur
Copy link

n8chur commented Mar 31, 2017

There is currently no way to set the user tracking mode to follow while also adjusting the pitch, heading, and zoom level using an animation. There is also no way to use a custom media timing function for the user tracking mode change animation.

I've tried setting the pitch, heading, and zoom to the user's location first, and then on completion setting the tracking mode to follow, but there is a noticeable jump as it starts following (especially if the user's location has changed significantly during the animation).

It would be nice to have a method to set the tracking mode with pitch, heading, and zoom level. Something like:

- (void)setUserTrackingMode:(MGLUserTrackingMode)mode pitch:(CGFloat)pitch heading:(CLLocationDirection)heading zoomLevel:(double)zoomLevel duration:(NSTimeInterval)duration animationTimingFunction:(nullable CAMediaTimingFunction *)function completion:(nullable void (^)(void))completion;

Another alternative could be to have a type of camera that always follows the user's location and where centerCoordinate is not settable.

@1ec5
Copy link
Contributor

1ec5 commented Apr 2, 2017

As of #7856, programmatic camera changes no longer boot the user out of user tracking mode, but you’re right that there’s still a jarring transition whether you set the user tracking mode first or move the camera into place first. We’re hoping to improve transitions around user tracking mode in general by implementing concurrent animations (#3625). At this point, #8176 looks like the most likely path forward.

/cc @frederoni

@1ec5 1ec5 added iOS Mapbox Maps SDK for iOS navigation For the Mapbox Navigation SDK for Android or iOS or navigation use cases in general labels Apr 2, 2017
@stale stale bot added the archived Archived because of inactivity label Nov 10, 2018
@stale
Copy link

stale bot commented Nov 26, 2018

This issue has been automatically detected as stale because it has not had recent activity and will be archived. Thank you for your contributions.

@stale stale bot closed this as completed Nov 26, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
archived Archived because of inactivity iOS Mapbox Maps SDK for iOS navigation For the Mapbox Navigation SDK for Android or iOS or navigation use cases in general
Projects
None yet
Development

No branches or pull requests

2 participants