【发布时间】:2022-01-24 02:35:57
【问题描述】:
我正在使用 react native,我想将 borderRadius 添加到我的谷歌地图视图中,但没有成功
<View
style={{
backgroundColor: "#fff",
flex: 1,
borderRadius: 30,
margin: 20,
}}
>
<Map />
</View>
<View
style={{
marginTop: 40,
flexDirection: "column",
justifyContent: "center",
height: 300,
width: 370,
}}
>
地图组件:
const Map = () => {
return (
<MapView
style={tw`flex-1`}
customMapStyle={mapStyle}
initialRegion={{
latitude: 37.78825,
longitude: -122.4324,
latitudeDelta: 0.0922,
longitudeDelta: 0.0421,
}}
/>
);
};
那么我该如何正确地做到这一点呢?
【问题讨论】:
标签: css react-native google-maps google-maps-api-3