0
I’m trying to get an icon under the mapview in my project, so:
But now it’s like this:
Code:
<View style={styles.viewMaps}>
{this.state.ready && this.state.region && this.state.region.latitude != null && this.state.region.longitude != null?
<MapView
ref={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.Marker
coordinate={{latitude: this.props.dataSource.latitude, longitude: this.props.dataSource.longitude}}
>
</MapView.Marker>
: null}
</MapView>: null}
<View style={styles.endereco}>
<View style={styles.viewGps1}>
<Text style={styles.enderecoText}>{this.props.dataSource.endereco}</Text>
</View>
<View style={styles.viewGps}>
<Icon name="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"
}
Thanks, but I ended up solving this problem already (I forgot to have marked as solved here) ... If you got the spot that was open, congratulations and good luck. Hugs
– Henrique Hermes
kkkkkk, yes I did, in fact there are still more vacancies. Hugs
– Alan Oliveira de Quadros
I want to too
– Bruno Mazzardo