forked from anhtuank7c/maps-example
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
30 lines (27 loc) · 721 Bytes
/
App.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
import React, { Component } from "react";
import { AppRegistry, StyleSheet, Text, View } from "react-native";
import MapView, { PROVIDER_GOOGLE } from "react-native-maps";
export default class App extends Component {
render() {
return (
<View style={styles.container}>
<MapView
provider={PROVIDER_GOOGLE}
initialRegion={{
latitude: 20.993776,
longitude: 105.811417,
latitudeDelta: 0.021,
longitudeDelta: 0.021
}}
style={StyleSheet.absoluteFillObject}
/>
</View>
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1
}
});
AppRegistry.registerComponent("MyMap", () => App);