-
Notifications
You must be signed in to change notification settings - Fork 318
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 updating location puck bottom offset #323
Comments
The map SDK currently provides an option, One fix would be to publicly expose the MGLMapView method that positions the user puck (and thus the point on the screen around which the camera is fixed), allowing a subclass to override the logic, with mapbox/mapbox-gl-native#5302 as a design precedent. This is tracked in mapbox/mapbox-gl-native#6867 (comment). Before we go down that route, however, is there an opportunity to improve the existing “bottom” vertical alignment? As I understand it, the problem is that the puck positioning code doesn’t account for the map view’s content insets. Is it possible that mapbox/mapbox-gl-native#6566 exacerbated this problem? /cc @boundsj |
Once #213 is fixed, it would also be possible to adjust the offset by building some padding into the user location annotation view’s frame. |
#498 made it possible to customize the user location annotation view. This made it possible to pad the view’s frame to force the view to appear at a different position on screen. #402, which we hope to land next week after some testing, overhauls the user puck implementation, disabling the solution in #498 but making it much easier to implement the feature proposed here. There are a couple possible designs, either of which can be implemented in short order:
|
I wound up implementing a delegate method along these lines as part of #402. It doesn’t have the route progress as an argument, but it’s pretty straightforward to get ahold of the route progress via |
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 bottom location puck offset while in course tracking.
This is a big hurdle for implementing custom navigation apps from scratch.
cc @bsudekum
The text was updated successfully, but these errors were encountered: