4
<MapView>
に<Image>
を追加しようとしています。このようになるはずです - 私はこのコードからトップ上の任意のビューが届かない別のものの上にビューをオーバーレイまたは追加する:ネイティブの反応
<MapView
mapType='standard'
style={styles.map}
region={{
latitude: selectedLoc.location.latitude,
longitude: selectedLoc.location.longitude,
latitudeDelta: 0.005,
longitudeDelta: 0.005
}}
onRegionChange={() => { } }
onRegionChangeComplete={() => { } }
showsUserLocation={false}
zoomEnabled={false}
draggable={false}
annotations={[{
longitude: selectedLoc.location.latitude,
latitude: selectedLoc.location.longitude,
title: selectedLoc.title
}]}
initialRegion={{
latitude: selectedLoc.location.latitude,
longitude: selectedLoc.location.longitude
}}>
<Image
style={{
width: 50,
height: 50,
}}
resizeMode={"contain"}
source={{ uri: 'https://unsplash.it/50/50/?random' }}
/>
</MapView>
-
はここに私のコードです。あなたに教えてください
とはどのようになっていますか?スクリーンショットを添付してください。 – Cherniv
地図のみが表示されます@Cherniv – shubhsin