-
Notifications
You must be signed in to change notification settings - Fork 1
Closed
Description
When I display a picture on the map in the marker component, it is not shown on the map
code:
import { Image, View } from 'react-native'
<MapView
ref={mainMapRef}
style={S.styles.map}
toolbarEnabled={false}
provider={MapProvider}
userInterfaceStyle={'light'}
maxZoomLevel={21}
cameraZoomRange={{
maxCenterCoordinateDistance: 1000000,
animated: true,
}}
initialRegion={initialRegion}>
....
<Marker
tracksViewChanges={false}
anchor={{ x: 0.5, y: 0.5 }}
coordinate={location}>
<View style={{ backgroundColor: 'blue' }}>
<Image
source={DefaultImage}
// pngSource={DefaultImage}
style={{
width: 30,
height: 30,
backgroundColor: 'red',
zIndex: 1000,
}}
/>
</View>
<Icon name={'UserPin'} />
</Marker>
screenshot
The map shows the component (SVG) and View is displayed on the map on the coordinates, but the image is not. I could not find a solution to the problem. I have tried many ways to display the image but I can only see the red background of the image and that's it.
I also managed to display the image by interlacing the marker image={{{uri}}}. But it cannot be edited in any way (dimensions, BorderRadius, etc.).
if there are any solutions, please help me
Metadata
Metadata
Assignees
Labels
No labels
