title: how to get the latitude and logtitude from the result of Location.getCurrentPositionAsync() in react-native
body: <p>this is my code for get device's current location. </p>
  
  <pre><code>import React, { Component } from 'react';
  import { Platform, Text, View, StyleSheet, FlatList } from 'react-native';
  import { Constants, Location, Permissions, MapView } from 'expo';
  
  export default class Home extends Component {
  
      state = {
          location: null,
          errorMessage: null,
      };
  
      componentWillMount() {
          if (Platform.OS === 'android' &amp;&amp; !Constants.isDevice) {
              this.setState({
                  errorMessage: 'Oops, this will not work on Sketch in an Android emulator. Try it on your device!',
              });
          } else {
              this._getLocationAsync();
          }
      }
  
      _getLocationAsync = async () =&gt; {
          let { status } = await Permissions.askAsync(Permissions.LOCATION);
          if (status !== 'granted') {
              this.setState({
                  errorMessage: 'Permission to access location was denied',
              });
          }
  
          let location = await Location.getCurrentPositionAsync({ enableHighAccuracy: true });
          this.setState({ location });
      };
  
      render() {
          let text = 'Waiting..';
          if (this.state.errorMessage) {
              text = this.state.errorMessage;
          } else if (this.state.location) {
              text = JSON.stringify(this.state.location);
          }
          console.log(text)
          return (
              &lt;MapView
                  style={{ flex: 1 }}
                  region={{
                      latitude: text.coords.latitude,
                      longitude: text.coords.longitude,
                      latitudeDelta: 0.1,
                      longitudeDelta: 0.1,
                  }}
              /&gt;
          );
      }
  }
  
  const styles = StyleSheet.create({
      container: {
          flex: 1,
          alignItems: 'center',
          justifyContent: 'center',
          paddingTop: Constants.statusBarHeight,
          backgroundColor: '#ecf0f1',
      },
      paragraph: {
          margin: 24,
          fontSize: 18,
          textAlign: 'center',
      },
  });
  </code></pre>
  
  <p>what i wanna do is pass the latitude and logtitude to MapView. but this is not working. </p>
  
  <p>the output of 
  <code>console.log(text)</code> is </p>
  
  <pre><code>{
    "timestamp":1551594077000,
    "mocked":false,
    "coords":{
      "heading":0,
      "longitude":80.4380389,
      "speed":0,
      "altitude":-78,
      "latitude":6.0140343,
      "accuracy":21.238000869750977
  
    }
  </code></pre>
  
  <p>i'm running this project in my smart phone(galaxy j5 10) using expo application. all location permissions are given to the app and still not working. i tried lots of documentations, but it's not working. how can i correct this. </p>