maplibre-react-native
maplibre-react-native copied to clipboard
Warning: MarkerView: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.
Steps to Trigger Behavior
- Create a new MapLibreGL.MapView 2.. Add a MarkerView with coordinates
- Build and run the application. you will receive the warning.
Link to Minimal Reproducible Example
<View style={styles.container}>
<MapLibreGL.MapView
ref={mapRef}
style={styles.map}
logoEnabled={false}
styleURL={mapUri + token}
rotateEnabled={false}
zoomEnabled={true}
>
<MapLibreGL.Camera
zoomLevel={2}
centerCoordinate={[defaultView?.longitude ?? 0, defaultView?.latitude ?? 0]}
/>
{ shipment?.shipmentStops.map((x, i) => {
return (
<MarkerView key={i} coordinate={[x.location?.longitude ?? 0, x.location?.latitude ?? 0]}>
<View style={{backgroundColor: 'red', width: 10, height: 10, borderRadius: 5}}></View>
</MarkerView>
)
})}
<RippleButton iconName="mode-of-travel" iconSize={25} onPress={() => setIsLiveView(!isLiveView)} color="#000000" ></RippleButton>
</MapLibreGL.MapView>
</View>
Expected Behavior
No Warning
Actual Behavior
Warning
Screenshots (if applicable)
Version(s) affected
- Platform: [e.g. Android, iOS]
- OS version: [e.g. Android 9, iOS 10]
- Device type: [e.g. iPhone6]
- Emulator/ Simulator: [yes/ no]
- Development OS: [e.g. OSX 11.0.1, Win10]
- maplibre-react-native Version [e.g. 7.0.9]
- MapLibre GL version [e.g. 6.3.0]
- React Native Version [e.g. 0.59]