Repository navigation
Stop updating location on map view - #343
Merged
Merged
Conversation
Contributor
|
Deferring judgement to @1ec5 on this one. |
Contributor
This isn’t unreasonable, but between this change and mapbox/mapbox-gl-native#6867, I wonder how much we’re benefiting from the map SDK’s built-in course tracking functionality in the first place. #352 would move us off that built-in functionality in favor of a custom implementation that we’d have more control over. |
frederoni
force-pushed
the
fred-stop-mapview-updates
branch
from
July 12, 2017 12:03
9377fd3 to
2484189
Compare
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #341
When an application is sent to the background and brought back to the foreground,
MGLMapViewcalls-validateLocationServicesand starts updating locations again.This is easy to spot when using
SimulatedLocationManagerorReplayLocationManagerbut not if you're using theDefaultLocationManagersince the location will be exactly the same.The fix in this PR works, however, I think a more appropriate solution would be to expose a
manuallyUpdatesLocation(or similar) onMGLMapViewthat would leave location updating to the user. At the same time, we would also expose thatMGLMapViewconforms toCLLocationManagerDelegateso that you can feedMGLMapViewwith locations without using the workaround in https://github.com/mapbox/mapbox-navigation-ios/blob/master/MapboxNavigation/MGLMapView%2BMGLNavigationAdditions.h#L5@1ec5 @bsudekum @ericrwolfe 👀