-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathMapScreen.js
89 lines (78 loc) · 2.03 KB
/
MapScreen.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
import React, { Component } from 'react'
import {
View,
Text,
StyleSheet,
} from 'react-native'
import MapView from 'react-native-maps';
//https://www.youtube.com/watch?v=s23HPMdifvI&feature=youtu.be
class MapScreen extends React.Component {
render() {
var { navigate } = this.props.navigation;
return (
<View style={styles.container}>
<MapView
style={styles.mapst}
initialRegion={{
latitude: 12.9716,
longitude: 77.5946,
latitudeDelta: 0.0922,
longitudeDelta: 0.0421,
}}>
<MapView.Marker
coordinate={{
latitude: 12.9716,
longitude: 77.5946,
}}
>
{/* <View style={styles.radius}>
<View style={styles.marker}></View>
</View> */}
</MapView.Marker>
</MapView>
</View>
);
}
}
MapScreen.navigationOptions = {
title: 'Map Screen',
};
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#d9f9b1',
alignItems: 'center',
},
text: {
color: '#4f603c',
textAlign: 'left',
},
mapst: {
top: 0,
bottom: 0,
left: 0,
right: 0,
position: 'absolute'
},
radius: {
height: 50,
width: 50,
borderRadius: 50 / 2,
overflow: 'hidden',
backgroundColor: '#1d1d1d',
borderColor: 'green',
borderRadius: 1,
alignItems: 'center',
justifyContent: 'center'
},
marker: {
height: 20,
width: 20,
borderRadius: 20 / 2,
overflow: 'hidden',
backgroundColor: '#666666',
borderColor: 'white',
borderRadius:3,
}
})
export default MapScreen;