Is there an existing issue for this?
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
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
- Init navigation
- Keep myLocationEnabled as true with react useState
- setDestination
- startGuidance
- stopGuidance from the listener setOnArrival
- 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
Is there an existing issue for this?
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
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
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
Additional Context
No response