-
-
Notifications
You must be signed in to change notification settings - Fork 936
Closed
Description
Mapbox Implementation
Mapbox
Mapbox Version
11.0.0-rc.1
Platform
iOS
@rnmapbox/maps version
10.1.0-beta.20
Standalone component to reproduce
import * as React from "react";
import { Platform, StyleSheet } from "react-native";
import Mapbox, { StyleImport } from "@rnmapbox/maps";
interface MapViewProps {}
const MapView = (props: MapViewProps) => {
const {} = props;
// refs
const mapRef = React.useRef<Mapbox.MapView>(null);
// render
return (
<Mapbox.MapView
ref={mapRef}
// zoomEnable={true} // same behavior
gestureSettings={{
rotateEnabled: false,
}}
style={{ flex: 1 }}
styleURL="mapbox://styles/mapbox/standard-beta"
>
<StyleImport
id="basemap"
existing
config={{
lightPreset: "dusk",
// @ts-ignore
showRoadLabels: false,
// @ts-ignore
showPlaceLabels: false,
// @ts-ignore
showTransitLabels: false,
// @ts-ignore
showPointOfInterestLabels: false,
}}
/>
</Mapbox.MapView>
);
};
export default MapView;Observed behavior and steps to reproduce
When attempting to set the gestureSettings property (or zoomEnabled) on Mapbox.MapView, the application crashes. The crash occurs when unwrapping an optional value in the setReactGestureSettings method, as indicated by the runtime error 'Fatal error: Unexpectedly found nil while implicitly unwrapping an Optional value'. This issue can be reproduced by initializing a MapView with the gestureSettings prop.
With gestureSettings property:
With zoomEnabled property:
Expected behavior
The expected behavior is for the app to run without crashing when setting the gestureSettings property (or zoomEnabled).
Notes / preliminary analysis
No response
Additional links and references
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
