title: TypeError: undefined is not an object( evaluating 'navigator.geolocation.getCurrentPosition')
body: <p>I have recently started working on react-native, now am trying to access react-native-maps for the reason wherever I click on the map it should give me the coordinates. I installed react-native-map and tried to use below method</p>
  
  <pre><code>navigator.geolocation.getCurrentPosition((position) =&gt; {
  </code></pre>
  
  <p>I am getting below error. </p>
  
  <blockquote>
  <pre><code>E | ReactNativeJS ▶︎ TypeError: undefined is not an object (evaluating 'navigator.geolocation.getCurrentPosition')
                               │ 
                               │ This error is located at:
                               │ in App (at renderApplication.js:40)
                               │ in RCTView (at View.js:35)
                               │ in View (at AppContainer.js:98)
                               │ in RCTView (at View.js:35)
                               │ in View (at AppContainer.js:115)
                               └ in AppContainer (at renderApplication.js:39)
  </code></pre>
  </blockquote>
  
  <p>My code looks similar like this.</p>
  
  <pre><code>  componentDidMount() {
      navigator.geolocation.getCurrentPosition((position) =&gt; {
        var lat = parseFloat(position.coords.latitude)
        var long = parseFloat(position.coords.longitude)
  
        var initialRegion = {
          latitude: lat,
          longitude: long,
          latitudeDelta: LATITUDE_DELTA,
          longitudeDelta: LONGITUDE_DELTA,
        }
  
        this.setState({initialPosition: initialRegion})
      },
      (error) =&gt; alert(JSON.stringify(error)),
      {enableHighAccuracy: true, timeout: 20000});
    }
  </code></pre>
  
  <p>Also I tried with some other methods like</p>
  
  <pre><code>this.watchID = navigator.geolocation.watchPosition((position) =&gt; {
  </code></pre>
  
  <p>and</p>
  
  <pre><code>navigator.geolocation.clearWatch(this.watchID);
  </code></pre>
  
  <p>How can I solve this problem and make these methods work from react-native-maps</p>
  
  <p>I am using <code>import MapView from 'react-native-maps';</code> this import</p>