Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow overriding the location puck's location #324

Closed
ericrwolfe opened this issue Jun 30, 2017 · 6 comments
Closed

Allow overriding the location puck's location #324

ericrwolfe opened this issue Jun 30, 2017 · 6 comments

Comments

@ericrwolfe
Copy link
Contributor

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 😬:

mapView.locationManager(routeController.locationManager, didUpdateLocations: [location])

cc @bsudekum

@ericrwolfe ericrwolfe added this to the v0.5.0 milestone Jun 30, 2017
@1ec5
Copy link
Contributor

1ec5 commented Jul 1, 2017

This is being tracked upstream in mapbox/mapbox-gl-native#6867.

/ref #57 #172

@1ec5 1ec5 modified the milestones: v0.5.0, v0.6.0 Jul 9, 2017
@ericrwolfe ericrwolfe modified the milestones: v0.6.0-2, v0.6.0-1 Jul 21, 2017
@ericrwolfe
Copy link
Contributor Author

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
Copy link
Contributor

1ec5 commented 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.

@ericrwolfe ericrwolfe removed this from the v0.6.0-2 milestone Jul 27, 2017
@1ec5
Copy link
Contributor

1ec5 commented 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
Copy link
Contributor

1ec5 commented 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 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.

@bsudekum
Copy link
Contributor

Closing now that #402 is in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants