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 }}
Repository navigation
Allow overriding the location puck's location #324
This is an upstream issue in mapbox-gl-native (@1ec5 I can't recall the ticket), but based on the release cycles of mapbox-gl-native, we should consider adding a workaround to the navigation SDK that allows developers to customize the location used to display the maps location puck while in course tracking mode.
The example app's CustomViewController gets around this by disabling the mapView's location and heading updates and overriding it's internal locationManager delegate callback 😬:
#402 moves that category to the example application proper, since it will no longer be used by the navigation SDK. Even now, we could eliminate the category in favor of -respondsToSelector: and -performSelector:withObject:withObject:, which would be safer than forward declaration albeit less aesthetically pleasing.
#402, which we hope to land next week after some testing, will reimplement course tracking without hackily overriding -locationManager:didUpdateLocations:; however, there’s still an MGLMapView+MGLNavigationAdditions.h that hackily overrides -mapViewDidFinishRenderingFrameFullyRendered: and redeclares displayLink in order to mitigate the power consumption issue in #370.
Note that this ticket only covers the navigation SDK’s own ability to control the geographic location of the user puck. It has no direct impact on developers using this SDK. #323 is about allowing the developer to control the puck’s position on screen.
Activity
1ec5 commentedon Jul 1, 2017
This is being tracked upstream in mapbox/mapbox-gl-native#6867.
/ref #57 #172
ericrwolfe commentedon Jul 26, 2017
Currently, it's not possible to set up location simulation to override the puck's location like in the example app using just Core Navigation, as the example app makes use of this category on MGLMapView (https://github.com/mapbox/mapbox-navigation-ios/blob/master/MapboxNavigation/MGLMapView%2BMGLNavigationAdditions.h).
1ec5 commentedon Jul 27, 2017
#402 moves that category to the example application proper, since it will no longer be used by the navigation SDK. Even now, we could eliminate the category in favor of
-respondsToSelector:and-performSelector:withObject:withObject:, which would be safer than forward declaration albeit less aesthetically pleasing.1ec5 commentedon Aug 18, 2017
#323 (comment) describes a way to precisely customize the location of the user puck on screen that should tide us over until #402 lands.
1ec5 commentedon Oct 6, 2017
#402, which we hope to land next week after some testing, will reimplement course tracking without hackily overriding
-locationManager:didUpdateLocations:; however, there’s still an MGLMapView+MGLNavigationAdditions.h that hackily overrides-mapViewDidFinishRenderingFrameFullyRendered:and redeclaresdisplayLinkin order to mitigate the power consumption issue in #370.Note that this ticket only covers the navigation SDK’s own ability to control the geographic location of the user puck. It has no direct impact on developers using this SDK. #323 is about allowing the developer to control the puck’s position on screen.
bsudekum commentedon Mar 28, 2018
Closing now that #402 is in.