title: How can change marker position in react native maps?
body: <p>Hello I want to add a draggable marker on the map "change a position of marker-based on map views"
  So I use react-native-maps,</p>
  
  <p>when the user swipes the map and changes his location the marker following hem so in my code I log it in the console but I can't see anything in the logs or it's not made in this way!
  How can I make it draggable on the map?</p>
  
  <p>here is what I want to achieve
  <a href="https://i.stack.imgur.com/vNrh1.gif" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/vNrh1.gif" alt="map"></a></p>
  
  <p>here's my code</p>
  
  <pre><code>import React, {Component} from 'react';
  import {StyleSheet, View} from 'react-native';
  import MapView, {Marker} from 'react-native-maps';
  
  // create a component
  class App extends Component {
    state = {
      latlng: {
        latitude: 35.1790507,
        longitude: -6.1389008,
      },
    };
    render() {
      return (
        &lt;View style={styles.container}&gt;
          &lt;MapView
            style={styles.map}
            region={{
              latitude: 35.1790507,
              longitude: -6.1389008,
              latitudeDelta: 0.015,
              longitudeDelta: 0.0121,
            }}&gt;
            &lt;Marker
              draggable
              coordinate={this.state.latlng}
              title="Home"
              onDragEnd={e =&gt; {
                console.log('dragEnd', e.nativeEvent.coordinate);
              }}
            /&gt;
          &lt;/MapView&gt;
        &lt;/View&gt;
      );
    }
  }
  
  const styles = StyleSheet.create({
    container: {
      ...StyleSheet.absoluteFillObject,
      // height: 400,
      // width: 400,
      justifyContent: 'flex-end',
      alignItems: 'center',
    },
    map: {
      ...StyleSheet.absoluteFillObject,
    },
  });
  
  //make this component available to the app
  export default App;
  </code></pre>