maplibre-react-native icon indicating copy to clipboard operation
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.

Open Pieeer1 opened this issue 6 months ago • 1 comments

Steps to Trigger Behavior

  1. Create a new MapLibreGL.MapView 2.. Add a MarkerView with coordinates
  2. 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)

image

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]

Additional context

Pieeer1 avatar Aug 06 '24 20:08 Pieeer1