Guest User

Untitled

a guest
Nov 21st, 2017
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. import React, { Component } from 'react';
  2. import {
  3. StyleSheet,
  4. Text,
  5. View
  6. } from 'react-native';
  7.  
  8. import MapView from 'react-native-maps';
  9.  
  10. export default class App extends Component {
  11. render() {
  12. const { region } = this.props;
  13. console.log(region);
  14.  
  15. return (
  16. <View style ={styles.container}>
  17. <MapView
  18. style={styles.map}
  19. region={{
  20. latitude: 37.78825,
  21. longitude: -122.4324,
  22. latitudeDelta: 0.015,
  23. longitudeDelta: 0.0121,
  24. }}
  25. >
  26. </MapView>
  27. </View>
  28. );
  29. }
  30. }
  31.  
  32. const styles = StyleSheet.create({
  33. container: {
  34. ...StyleSheet.absoluteFillObject,
  35. height: 400,
  36. width: 400,
  37. justifyContent: 'flex-end',
  38. alignItems: 'center',
  39. },
  40. map: {
  41. ...StyleSheet.absoluteFillObject,
  42. },
  43. });
Add Comment
Please, Sign In to add comment