Skip to content

Instantly share code, notes, and snippets.

@flavindias
Last active January 20, 2018 19:21
Show Gist options
  • Save flavindias/5406fb0c94cb5b4b5f9f55827666d610 to your computer and use it in GitHub Desktop.
Save flavindias/5406fb0c94cb5b4b5f9f55827666d610 to your computer and use it in GitHub Desktop.
/**
* Sample React Native Map App
* https://github.com/facebook/react-native
* @flow
*/
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View
} from 'react-native';
import MapView from 'react-native-maps';
export default class ReactMap extends Component {
render() {
return (
<View style ={styles.container}>
<MapView
style={styles.map}
region={{
latitude: 37.78825,
longitude: -122.4324,
latitudeDelta: 0.015,
longitudeDelta: 0.0121,
}}
>
</MapView>
</View>
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: '#F5FCFF',
},
map: {
position: 'absolute',
top: 0,
left: 0,
right: 0,
bottom: 0,
},
});
AppRegistry.registerComponent('ReactMap', () => ReactMap);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment