React Native:在react-native-maps中设置用户位置样式

时间:2018-07-16 07:27:39

标签: react-native react-native-maps

如何在React Native Maps上设置‍ UserLocation

<MapView
    region={this.props.coordinate}
    showsUserLocation={true} // <- style for this option
  >
    //My map markers
</MapView>

样式

{
   position:"absolute",
   top:100,
   right:100,
}

1 个答案:

答案 0 :(得分:1)

您不能直接设置mapView组件的样式。您所能做的就是将mapView放置在普通视图中,并且可以根据需要设置视图的样式。

您可以将样式放在单独的.js文件中,我想它的文件名中带有“样式”后缀。

相关问题