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
Unable to turn on user location tracking immediately at startup #1145
Comments
The workaround is to first set a valid center coordinate. That’s a pretty sensible workaround, so I don’t think this bug is important for beta 1. |
This was referenced Mar 30, 2015
Pretty sure this is obsolete, but needs testing. |
Still reproduces. Without setting a center coordinate, set the user tracking mode. Nothing happens. |
This is probably stale now, given that |
Tried this on #3680's branch — plain |
A fix is ready in #3680. |
1ec5
added a commit
that referenced
this issue
Jan 27, 2016
Entering user tracking mode at launch now zooms in and shows the user dot or user puck. The user dot’s heading indicator now points in the correct direction during the animation to the initial location. Course changes are reflected immediately even in the absence of location changes. Fixes #1145.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Currently it doesn’t seem possible for an app to turn on
MGLUserTrackingModeFollowWithHeading
at startup, because-[MGLMapView setUserTrackingMode:animated:]
goes and resets the mode toMGLUserTrackingModeNone
ifself.userLocation.coordinate
is invalid. The coordinate is invalid from startup until we receive the first location update. And settingMGLUserTrackingModeFollow
at startup doesn’t quite work either: we pan and zoom to the current location but immediately stop following after that.The text was updated successfully, but these errors were encountered: