Skip to content

[Bug]: ios myLocationEnabled has issues with being toggled #597

@qwalker8408-aura

Description

@qwalker8408-aura

Is there an existing issue for this?

  • I have searched the existing issues

Description of the bug

When I use react state to programmatically show/hide the location puk with myLocationEnabled on the NavigationView it does not do it. This is after I had it enabled in navigation but I have now stopped guidance.

React Native version

0.83.0

React version

19.2.0

Package version

0.15.2

Native SDK versions

  • I haven't changed the version of the native SDKs

React Native Doctor Output

Common
✓ Node.js - Required to execute JavaScript code
✓ yarn - Required to install NPM dependencies
✓ npm - Required to install NPM dependencies
✓ Watchman - Used for watching changes in the filesystem when in development mode
✓ Metro - Required for bundling the JavaScript code

Android
✓ Adb - Required to verify if the android device is attached correctly
✓ JDK - Required to compile Java code
✓ Android Studio - Required for building and installing your app on Android
✓ ANDROID_HOME - Environment variable that points to your Android SDK installation
✓ Gradlew - Build tool required for Android builds
✓ Android SDK - Required for building and installing your app on Android

iOS
✓ Xcode - Required for building and installing your app on iOS
✓ Ruby - Required for installing iOS dependencies
✓ CocoaPods - Required for installing iOS dependencies
✓ .xcode.env - File to customize Xcode environment

Errors: 0
Warnings: 0

Steps to reproduce

  1. Init navigation
  2. Keep myLocationEnabled as true with react useState
  3. setDestination
  4. startGuidance
  5. stopGuidance from the listener setOnArrival
  6. Change myLocationEnabled to false

This is occurring on IOS. Seems like on Android it works but if I try to do this on Android when the map loads i need to programatically toggle this within a onMapReady and a setTimeout for my react state to do its thing on myLocationEnabled after a certain delay. Usually 100ms suffices to hide it.

Expected vs Actual Behavior

Expected - based upon my react state to either hide or show the location puk. For now its fine to see the location puk during navigation (in guidance) but it must be able to be toggled after I've stopped guidance and the navigation is complete.
Actual - my react state doesn't toggle after I've stopped guidance

Code Sample

useEffect(() => {
    setOnArrival(() => {
        await navigationController.stopGuidance();
        await navigationController.clearDestinations();
        setMyLocationEnabled(false);
})
}

Additional Context

No response

Metadata

Metadata

Assignees

Labels

triage meI really want to be triaged.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions