-
Notifications
You must be signed in to change notification settings - Fork 315
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
Remove workarounds adding content inset when setting map camera #2145
Comments
In rudimentary testing, |
Fixed in #2134. |
I must not’ve been paying close enough attention, but |
Possibly related to mapbox/mapbox-gl-native#15232. |
This is probably mapbox/mapbox-gl-native#15233. |
Decouple dependency content insets -> anchor point -> padding/content insets broken after mapbox/mapbox-gl-native#14664 introduced animated interpolation for padding change. Remove the need to specify center for puck view - use the approach where content inset is keeping it centered. Take safeArea into account when calculating contentInsets. Addresses: mapbox/mapbox-gl-native#15232, mapbox/mapbox-gl-native#15233 Related to: #2165, Fixes: #2145
Since mapbox/mapbox-gl-native@4026451 is already in 5.1, it requires described update. As padding is added to content inset, current anchor point calculation is out of sync with mapbox/mapbox-gl-native#14813 and effectively adds content insets twice: once in anchor point calculation and once in setCamera - defined in mapbox/mapbox-gl-native#12818. This is a cause of having the puck jumping down - working on fix for this in #2211. |
Decouple dependency content insets -> anchor point -> padding/content insets broken after mapbox/mapbox-gl-native#14664 introduced animated interpolation for padding change. Remove the need to specify center for puck view - use the approach where content inset is keeping it centered. Take safeArea into account when calculating contentInsets. Addresses: mapbox/mapbox-gl-native#15232, mapbox/mapbox-gl-native#15233 Related to: #2165, Fixes: #2145
In my experience, the puck is detaches from the route while jumping up, although when it's down it's too low as well, so the puck sort of either being too low (which is not too bad cause I can offset that myself I think) or too high and detached. Either way, is there any immediate workaround for puck jumping up/down? I'm using
Update: workaround to this is to adopt this unmerged PR: #2211 (comment) |
Decouple dependency content insets -> anchor point -> padding/content insets broken after mapbox/mapbox-gl-native#14664 introduced animated interpolation for padding change. Remove the need to specify center for puck view - use the approach where content inset is keeping it centered. Take safeArea into account when calculating contentInsets. Addresses: mapbox/mapbox-gl-native#15232, mapbox/mapbox-gl-native#15233 Related to: #2165, Fixes: #2145
Once mapbox/mapbox-gl-native#14813 lands and we upgrade to map SDK v5.1.0,
NavigationMapView.userAnchorPoint
and possibly other methods need to be updated to stop adding the map view’scontentInset
to the edge padding when setting the map’s camera./ref #1651 (comment)
/cc @mapbox/navigation-ios @fabian-guerra @d-prukop
The text was updated successfully, but these errors were encountered: