React native 如何使用react native更改GoogleMap标记的针和点颜色
如何更改标记针点颜色。我改变了标记针的颜色,但点的颜色没有改变。请帮帮我React native 如何使用react native更改GoogleMap标记的针和点颜色,react-native,react-native-maps,React Native,React Native Maps,如何更改标记针点颜色。我改变了标记针的颜色,但点的颜色没有改变。请帮帮我 <Marker coordinate={destination} centerOffset={{ x: -18, y: -60 }} anchor={{ x: 0.69, y: 1 }} pinColor={colors.zyberia.primary} />:null} {destination != null? <MapViewDirections origin={origin}
<Marker
coordinate={destination} centerOffset={{ x: -18, y: -60 }} anchor={{
x: 0.69, y: 1 }} pinColor={colors.zyberia.primary} />:null}
{destination != null? <MapViewDirections origin={origin}
destination={destination} apikey={apiKey} strokeWidth={3}
strokeColor={colors.zyberia.primary} />:null}enter code here
</MapView.Animated>
:null}
{destination!=null?:null}在此处输入代码
您所说的、、标记点颜色“”是什么意思
下面我粘贴的代码用于在我的应用程序中使用颜色更改标记样式,我使用:
由该代码创建的标记如下所示:
感谢您的回复,我们无法更改默认标记点,而是创建自定义标记。我创建了自定义标记。
<Marker
coordinate={spot.coords}>
title={spot.name}
<View style={styles.marker}>
<Entypo name="location-pin" size={24} color="#344163"/>
</View>
</Marker>
marker: {
width: 40,
height: 40,
borderRadius: 40,
justifyContent: 'center',
alignItems: 'center',
borderWidth: 1,
borderColor: '#FFF',
},