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

mapViewController.getMyLocation returns undefined when called within onMapReady or onNavigationReady for iOS. #320

Open
rhinkle opened this issue Oct 29, 2024 · 1 comment
Assignees
Labels
priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. status: investigating The issue is under investigation, which is determined to be non-trivial. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@rhinkle
Copy link

rhinkle commented Oct 29, 2024

For iOS, When the first time you land on the Navigation Screen and you call getMyLocation method, it returns undefined. Even if you go back to the Home screen and come back to the Navigation screen, it still returns undefined.

Android works as expected.

Is there something im doing wrong or is this a bug?

Note* We are using @react-navigation/material-top-tabs for tabs. When the screen loads that has the tabs on it all tabs render which works ok for iOS however for Android it crashes the application, I do not have an example of this right now. Because of the crash I have to conditionally render the NavigationView map as seen in the example branch.

Environment details

Library version and other environment information:

  • react-native-navigation-sdk version: 0.5.1
  • Google Maps SDK for iOS version: 8.4.0.0

OS type and version

  • iOS: 18.1, 18.0
  • Android: 35

Steps to reproduce

  1. Pull down this branch.
  2. Install the dependencies.
  3. Run yarn start
  4. Run yarn ios or yarn android
  5. Click on Navigation Button. Check logs for the following message. 'Ryan - My location:', undefined
  6. Hit the Home button and then click Navigation again. Check logs for the following message. 'Ryan - My location:', undefined

Code example

Example Branch

Stack trace

Screenshot 2024-10-29 at 4 18 27 PM
Screenshot 2024-10-29 at 4 26 56 PM

Thank you for your help!

@rhinkle rhinkle added triage me I really want to be triaged. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Oct 29, 2024
@jokerttu jokerttu added status: investigating The issue is under investigation, which is determined to be non-trivial. priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. and removed triage me I really want to be triaged. labels Oct 30, 2024
@jokerttu
Copy link
Contributor

@rhinkle thanks for reporting the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. status: investigating The issue is under investigation, which is determined to be non-trivial. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

2 participants