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

Current Location Marker Moves Out of View When Hiding App Bar #4723

Open
bashcious opened this issue Sep 26, 2024 · 12 comments
Open

Current Location Marker Moves Out of View When Hiding App Bar #4723

bashcious opened this issue Sep 26, 2024 · 12 comments
Labels
bug Something isn’t working

Comments

@bashcious
Copy link

Mapbox Navigation SDK version

3.3.1

Steps to reproduce

  • Create an embedded view with app bar
  • Display the app bar at the top of the screen.
  • Tap to hide the app bar while the navigation is active.
  • Observe the current position marker's behavior.

Expected behavior

The current location marker should remain visible and centered on the map when the app bar is hidden, maintaining a consistent user experience.

Actual behavior

The current location marker moves downwards and is no longer visible on the screen when the app bar is hidden.

How can I solve this issue if it's ain't a bug.

ScreenRecording_09-26-2024.2-14-26.PM_1.MP4

Is this a one-time issue or a repeatable issue?

repeatable

@bashcious bashcious added the bug Something isn’t working label Sep 26, 2024
@chizhavko
Copy link
Contributor

Hello @bashcious, thank you so much for your report. Can you please provide any binary where we can reproduce this issue?

@bashcious
Copy link
Author

Thank you for the response.

Do note I encountered this issue while creating a Flutter package for Mapbox Navigation. Anyway i was able to reproduce it using the example app in this repository, with a minor modification: adding a NavigationBar to the EmbeddedExampleViewController. You can find the modified example and reproduce the issue here: https://github.com/bashcious/mapbox-ios-navigation-issue-repro-4723.git

Looking forward to your feedback.

record.mp4

@bashcious
Copy link
Author

Btw i notice same issue occurs when we switch from landscape to portrait mode

ScreenRecording_09-27-2024.2-11-30.PM_1.MP4

@bashcious
Copy link
Author

Any update on this or how to resolve it? we are kinda blocked. Thanks

@chizhavko
Copy link
Contributor

Hello @bashcious , thank you for your feedback. We are workin on this issues.

@chizhavko
Copy link
Contributor

Hello @bashcious, DynamicViewAnnotations behave differently based on property ignoreCameraPadding and your camera paddings which you can configure here.

@bashcious
Copy link
Author

Hello @chizhavko thanks for the response, but this doesn't resolve the issue, configuring setCamera works temporary for the mapview only, as soon as navigation starts it get's ignored and issue still persist

@ivanyeoh
Copy link

ivanyeoh commented Oct 7, 2024

Hi @chizhavko, is issue being worked on? It’s a blocker for us, and any help to resolve it ASAP would be greatly appreciated. Thanks!

@chizhavko
Copy link
Contributor

Hello @bashcious, @ivanyeoh. You can access MapView during Active Navigation via navigationMapView property on NavigationViewController and apply the same technic discussed earlier.

@bashcious
Copy link
Author

Hello @bashcious, @ivanyeoh. You can access MapView during Active Navigation via navigationMapView property on NavigationViewController and apply the same technic discussed earlier.

@chizhavko Yeah I've already tried that approach, but it didn't resolve the issue. Could you please share a sample code that works? We're currently blocked and working under tight deadlines, so resolving this as soon as possible would be greatly appreciated.

@chizhavko
Copy link
Contributor

@bashcious
Copy link
Author

Hey @chizhavko , Thanks. i have a solution for now but the issue seems to be Constraints related

Unable to simultaneously satisfy constraints.
	Probably at least one of the constraints in the following list is one you don't want. 
	Try this: 
		(1) look at each constraint and try to figure out which you don't expect; 
		(2) find the code that added the unwanted constraint or constraints and fix it. 
(
    "<NSLayoutConstraint:0x302f47d90 V:|-(0)-[MBBottomBannerView:0x147822140]   (active, names: '|':UIView:0x147821f80 )>",
    "<NSLayoutConstraint:0x302f47e30 MBBottomBannerView:0x147822140.bottom == MapboxNavigationUIKit.BottomPaddingView:0x147822300.top   (active)>",
    "<NSLayoutConstraint:0x302f3c1e0 V:[UILayoutGuide:0x303656220'UIViewSafeAreaLayoutGuide']-(0)-[MapboxNavigationUIKit.BottomPaddingView:0x147822300]   (active)>",
    "<NSLayoutConstraint:0x302f3d860 V:|-(0)-[UIView:0x147821f80]   (active, names: '|':MBBannerContainerView:0x13eef1400 )>",
    "<NSLayoutConstraint:0x302f3d8b0 UIView:0x147821f80.bottom == MBBannerContainerView:0x13eef1400.bottom   (active)>",
    "<NSLayoutConstraint:0x302cd2a30 MBBannerContainerView:0x13eef1400.height == 80   (active)>",
    "<NSLayoutConstraint:0x302c0b520 MBBottomBannerView:0x147822140.height == 60   (active)>",
    "<NSLayoutConstraint:0x302f502d0 'UIViewSafeAreaLayoutGuide-bottom' V:[UILayoutGuide:0x303656220'UIViewSafeAreaLayoutGuide']-(0)-|   (active, names: '|':UIView:0x147821f80 )>"
)

Will attempt to recover by breaking constraint 
<NSLayoutConstraint:0x302c0b520 MBBottomBannerView:0x147822140.height == 60   (active)>

Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKitCore/UIView.h> may also be helpful.
Unable to simultaneously satisfy constraints.
	Probably at least one of the constraints in the following list is one you don't want. 

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

No branches or pull requests

3 participants