小编Muj*_*Muj的帖子

无法将值从ReadableNativeMap强制转换为double

我有一个自定义标记图像,并且想为图像的不透明度使用一个变量。我执行以下操作,并收到此错误“无法将不透明的值从ReadableNativeMap转换为double”

var status=1;

  <MapView.Marker
         key={marker.latitude}
         coordinate={{ latitude: marker.latitude, longitude: marker.longitude }} 
         onPress={() => this.props.Quiz2(marker.latitude, marker.longitude)} >
    <View><Image source={require('../assets/icons/quiz.png')} style={{ width: 40, height: 40,opacity:status}}/></View>
</MapView.Marker>
Run Code Online (Sandbox Code Playgroud)

在此处输入图片说明

javascript variables android marker react-native

5
推荐指数
1
解决办法
1568
查看次数

标签 统计

android ×1

javascript ×1

marker ×1

react-native ×1

variables ×1