在使用react-native-maps的react-native应用程序中,我有以下部分:
<Marker
onPress={() => {
}}
onCalloutPress={(event) => {
}}
ref= {objectInMap.id}
key={objectInMap.id}
coordinate={objectInMap.coordinate}
anchor={{ x: 0, y: 0 }}
image={markerView}
>
<Callout>
<View>
<Text>Text</Text>
</View>
</Callout>
</Marker>
如果我删除自定义标注,则退出该应用后,一切正常。没有显示错误,也没有日志。 文本来自本机UI组件,标注来自react-native-maps
import {
Container,
Button,
Icon,
Header,
Title,
Left,
Body,
Right,
Switch,
Spinner,
Text,
Image
} from "native-base";
import MapView, { Marker, Polyline, Circle, LatLng, Point, Callout } from "react-native-maps";