Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import React, { Component } from 'react';
- import {
- StyleSheet,
- Text,
- View
- } from 'react-native';
- import MapView from 'react-native-maps';
- export default class App extends Component {
- render() {
- const { region } = this.props;
- console.log(region);
- 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: {
- ...StyleSheet.absoluteFillObject,
- height: 400,
- width: 400,
- justifyContent: 'flex-end',
- alignItems: 'center',
- },
- map: {
- ...StyleSheet.absoluteFillObject,
- },
- });
Add Comment
Please, Sign In to add comment