I'm trying to make an icon look under the mapview in my project, like this:
Butnowitlookslikethis:
Code:
<Viewstyle={styles.viewMaps}>{this.state.ready&&this.state.region&&this.state.region.latitude!=null&&this.state.region.longitude!=null?<MapViewref={map=>{this.map=map;}}style={styles.map}region={this.state.region}>{this.state.ready&&this.state.region&&this.state.region.latitude!=null&&this.state.region.longitude!=null?<MapView.Markercoordinate={{latitude:this.props.dataSource.latitude,longitude:this.props.dataSource.longitude}}></MapView.Marker>:null}</MapView>:null}<Viewstyle={styles.endereco}><Viewstyle={styles.viewGps1}><Textstyle={styles.enderecoText}>{this.props.dataSource.endereco}</Text></View><Viewstyle={styles.viewGps}><Iconname="map-marker-outline" size={35} color="#ca8a2d" />
</View>
</View>
</View>
CSS:
map:{
flex: 1,
width: Dimensions.get('window').width,
height: 110,
position: "relative"
},
viewGps:{
position: "absolute",
backgroundColor: "#FFF",
justifyContent: "center",
alignItems: "center",
borderRadius: 50,
height: 50,
width: 50,
right: 10,
top: -25
},
viewGps1:{
justifyContent: "center",
alignItems: "center",
marginRight: 70
},
viewMaps:{
flexDirection: 'column',
flex: 1.5,
alignSelf: "stretch",
alignItems: "flex-start",
justifyContent: "flex-start"
}