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

Puck Location fix #2387

Merged
merged 1 commit into from
Jun 11, 2020
Merged

Puck Location fix #2387

merged 1 commit into from
Jun 11, 2020

Conversation

Udumft
Copy link
Contributor

@Udumft Udumft commented Jun 4, 2020

Resolves puck location issue, caused by the bottom banner update.
Fixed updating Puck location on various events, including NavigationMapView resizing.

Edit: Removed internal link.

@Udumft Udumft added bug Something isn’t working user: support labels Jun 4, 2020
@Udumft Udumft self-assigned this Jun 4, 2020
if tracksUserCourse {
centerUserCourseView()
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the smoothest implementation I found so far, to make user puck slide in place gracefully...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#2211 removed the line that set the view’s center. Can you check that it doesn’t introduce any regressions related to that PR? Thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Issue description and reproduction steps for #2211 are a bit cryptic for me, but as I understood, the issue was about incorrect puck positioning during navigation, together with zooming/panning/rotating map view. I checked that user puck is located right on the route regardless of camera position and switching to/from course tracking mode. Is that what #2211 was about?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately, I’m not super clear on it myself; I’m not entirely convinced that #2211 was the right fix for #2145, and it definitely wasn’t a fix for mapbox/mapbox-gl-native#15232 or mapbox/mapbox-gl-native#15233.

The main things to watch out for are #2145 (comment) and #2145 (comment).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could not reproduce symptoms described in linked comments...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I understand correctly, the Nav SDK is not using the Maps SDK user location annotation, which means it will not account for contentInset changes. I think this pr is trying to update the user location annotation considering the "insets".

@asinghal22
Copy link

Team - if we are done - can we close this now with a merge?

It is blocking ...

https://docs.google.com/document/d/1DRXWZpD44wlmJ09WlNGcFd6w3ETo4R7AcEh4KMfRupI/edit#heading=h.ask7hvxmpgjf

@MaximAlien
Copy link
Contributor

This PR also possibly fixes #2364.

Copy link
Contributor

@fabian-guerra fabian-guerra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After looking at the code in the Maps SDK that updates the user location annotation position I think this is the right approach and is not causing a regression since this does not contrapone #2211, and is reusing code that was already there to position user location annotation.

if tracksUserCourse {
centerUserCourseView()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I understand correctly, the Nav SDK is not using the Maps SDK user location annotation, which means it will not account for contentInset changes. I think this pr is trying to update the user location annotation considering the "insets".

@Udumft Udumft merged commit 5888534 into master Jun 11, 2020
@Udumft Udumft deleted the vk-puck-location-on-resize branch June 11, 2020 07:43
@MaximAlien MaximAlien linked an issue Jun 16, 2020 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn’t working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NavigationView - Orientation Change
5 participants