Can't update Camera minZoomLevel dynamically
See original GitHub issueIf the minZoomLevel prop is changed after the camera has loaded, it doesn’t take effect unless the whole Camera component is reloaded and reset.
<Mapbox.Camera
ref={ref => this.cameraRef = ref}
animationMode="moveTo"
animationDuration={3000}
minZoomLevel={limitZoom ? 7 : 2}
maxZoomLevel={18}
/>
Update: this also seems to apply to maxBounds and likely other props that might be good to update dynamically.
Android React Native: 0.61.5 @react-native-mapbox-gl/maps: 7.0.4
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:9 (5 by maintainers)
Top Results From Across the Web
Can't update Camera minZoomLevel dynamically #597 - GitHub
If the minZoomLevel prop is changed after the camera has loaded, it doesn't take effect unless the whole Camera component is reloaded and...
Read more >How to set back camera zoom level to 0.5x using Swift?
The solution was not obvious: use AVCaptureDevice.default(.builtInTripleCamera, for: .video, position: .back) to get the real device capable of ...
Read more >How to Control the zoom in and zoom out in scene view
In the SceneView there isn't really "zoom". It's a camera that moves forward or backwards when the mouse wheel event fires.
Read more >Camera and view | Maps SDK for Android - Google Developers
CameraUpdateFactory.zoomTo(float) gives you a CameraUpdate that changes the zoom level to the given value, while keeping all other properties the same.
Read more >Change Zoom advanced options for accessibility on Mac
Change the size and position of the zoom window while working using the indicated keyboard shortcuts. Set the maximum and minimum levels of...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I guess it is because 10% of the time your map component is completely rerendering. minZoomLevel works on first mounting of the component. I still do have a plan to make a PR.
valid issue, go away stalebot