如何更改 React Native 地图中标记的大小?
How can I change the size of a marker in react native maps?
我正在尝试缩小地图上标记的大小,因为它太大了。
问题是在这种情况下使用 style = {} 似乎不起作用。
我在这里错过了什么?
<MapView.Marker
coordinate={{ latitude: 52.78825, longitude: 13.4324 }}
title="This should be me"
description="Some description"
image={require('../assets/icon.png')}
style={{width: 26, height: 28}}
>
您可以按照文档 here:
以这种方式呈现标记
<Marker ...>
<Image
source={require('../assets/icon.png')}
style={{width: 26, height: 28}}
resizeMode="contain"
/>
</Marker>
我正在尝试缩小地图上标记的大小,因为它太大了。
问题是在这种情况下使用 style = {} 似乎不起作用。
我在这里错过了什么?
<MapView.Marker
coordinate={{ latitude: 52.78825, longitude: 13.4324 }}
title="This should be me"
description="Some description"
image={require('../assets/icon.png')}
style={{width: 26, height: 28}}
>
您可以按照文档 here:
以这种方式呈现标记<Marker ...>
<Image
source={require('../assets/icon.png')}
style={{width: 26, height: 28}}
resizeMode="contain"
/>
</Marker>