You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.
How would I go about implementing user's course tracking when the tracking mode is .follow? The MGLUserLocationAnnotationView class that I subclass does not contain the userLocation property (it is set only when the tracking mode is .followWithHeading). But regardless of the tracking mode (with exception to .none) framework could provide the direction, heading and course data on the annotation view.
The reason I need this is to display the "north-up" map view with rotating user's annotation view. I could work around this by weakly capturing the user's annotation view and setting the custom course property on it and then leaving it to the framework to call update() but that doesn't feel as a clean solution to my problem.
Any advice is much appreciated.
The text was updated successfully, but these errors were encountered:
eimantas
changed the title
Tracking course when mode is .follow
[iOS] [macOS] Tracking course when mode is .followMar 3, 2017
You should be able to access MGLUserLocationAnnotationView.userLocation.location.course in any active tracking mode. Here is how we update the user location annotation in .followWithCourse, but this should be equally applicable in other modes.
Note that the addition of MGLUserTrackingMode to our macOS SDK was mistaken — it’s being made exclusive to iOS in #8141. There is not yet any concept of user location in our macOS SDK.
Platform: iOS
Mapbox SDK version: iOS 3.4.2
How would I go about implementing user's course tracking when the tracking mode is
.follow
? TheMGLUserLocationAnnotationView
class that I subclass does not contain theuserLocation
property (it is set only when the tracking mode is.followWithHeading
). But regardless of the tracking mode (with exception to.none
) framework could provide the direction, heading and course data on the annotation view.The reason I need this is to display the "north-up" map view with rotating user's annotation view. I could work around this by weakly capturing the user's annotation view and setting the custom course property on it and then leaving it to the framework to call
update()
but that doesn't feel as a clean solution to my problem.Any advice is much appreciated.
The text was updated successfully, but these errors were encountered: