You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

75 lines
1.8 KiB

import React, { Component } from 'react';
import {
Platform,
StyleSheet,
Text,
View
} from 'react-native';
import RunInfo from './components/run-info';
import MapView from 'react-native-maps';
const instructions = Platform.select({
ios: 'Press Cmd+R to reload,\n' +
'Cmd+D or shake for dev menu',
android: 'Double tap R on your keyboard to reload,\n' +
'Shake or press menu button for dev menu',
});
type Props = {};
export default class App extends Component<Props> {
render() {
return (
<View style={{flex: 1}}>
<MapView style={styles.map}
showsUserLocation
followsUserLocation
initialRegion={{
latitude: 37.33307,
longitude: -122.0324,
latitudeDelta: 0.02,
longitudeDelta: 0.02
}}
/>
{/*<Text style={{flex: 1, backgroundColor: 'green'}}>Map View</Text>*/}
{/*<View style={styles.infoWrapper}>*/}
{/*<RunInfo title = "Distance" value = "0 km"/>*/}
{/*<RunInfo title = "Speed" value = "0 km/h"/>*/}
{/*<RunInfo title = "Direction" value = "NE"/>*/}
{/*</View>*/}
</View>
);
}
}
const styles = StyleSheet.create({
infoWrapper: {
position: 'absolute',
left: 0,
bottom: 0,
right: 0,
flexDirection: 'row',
flex: 1
},
map: {
...StyleSheet.absoluteFillObject
},
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: '#F5FCFF',
},
welcome: {
fontSize: 20,
textAlign: 'center',
margin: 10,
},
instructions: {
textAlign: 'center',
color: '#333333',
marginBottom: 5,
},
});