We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Mapbox
10.19.0
0.76.0
iOS
@rnmapbox/maps
10.1.33
import React, { useEffect } from 'react'; import Mapbox from '@rnmapbox/maps'; const ShowMap = () => { useEffect(() => { Mapbox.locationManager.start(); return (): void => { Mapbox.locationManager.stop(); }; }, []); return ( <> <Mapbox.MapView styleURL="mapbox://styles/mapbox/satellite-v9" style={{ flex: 1, }} testID={'show-map'} gestureSettings={{ rotateEnabled: false, simultaneousRotateAndPinchZoomEnabled: false, rotateDecelerationEnabled: false, }} > <Mapbox.Camera followZoomLevel={12} followUserLocation /> <Mapbox.UserLocation /> </Mapbox.MapView> </> ); }; export default ShowMap;
When rotateEnabled in gestureSettings is set to false, the user can't rotate the map.
rotateEnabled
gestureSettings
false
No response
The text was updated successfully, but these errors were encountered:
Please fix the errors in your code example - More info.:
error: Parsing error: Unexpected token ) at example.jsx:9:13: 7 | Mapbox.locationManager.start(); 8 | > 9 | return (): void => { | ^ 10 | Mapbox.locationManager.stop(); 11 | }; 12 | }, []); 1 error found.```
Sorry, something went wrong.
I'm also experiencing this issue. Is there another way to stop the use from rotating the map?
I also tried the following on MapView: rotateEnabled={false} pitchEnabled={false}
MapView
rotateEnabled={false}
pitchEnabled={false}
But they also didn't work.
This should be fixed in v10.1.35 released today on npm.
No branches or pull requests
Mapbox Implementation
Mapbox
Mapbox Version
10.19.0
React Native Version
0.76.0
Platform
iOS
@rnmapbox/maps
version10.1.33
Standalone component to reproduce
Observed behavior and steps to reproduce
Simulator.Screen.Recording.-.iPhone.SE.3rd.generation.-.2024-11-02.at.16.34.29.mp4
Expected behavior
When
rotateEnabled
ingestureSettings
is set tofalse
, the user can't rotate the map.Notes / preliminary analysis
No response
Additional links and references
No response
The text was updated successfully, but these errors were encountered: