title: set marker based on react native google places autocomplete
body: <p>I want to generate a marker when user search for the location using react-native-google-places-autocomplete. I'm using expo react native. Currently, the marker is set at a fixed location. I want it to be set based on the input given by user through <code>react-native-google-places-autocomplete</code>. How can I achieve this? Below are my codes:</p>
  <pre><code>&lt;View&gt;
        &lt;GooglePlacesAutocomplete
                  placeholder=&quot;&quot;
                  query={{
                      key: GOOGLE_PLACES_API_KEY,
                      language: 'en', // language of the results
                  }}
                  fetchDetails={true}
                  onPress={(data, details:any) =&gt; { 
                      setDestinationLatitude(details.geometry.location.lat.toString()); 
                      setDestinationLongitude(details.geometry.location.lng.toString()); 
                  }}
                  onFail={(error) =&gt; console.error(error)}
                  requestUrl={{
                      url:
                      'https://cors-anywhere.herokuapp.com/https://maps.googleapis.com/maps/api',
                      useOnPlatform: 'web',
                  }} // this in only required for use on the web. See https://git.io/JflFv more for details.
                  keyboardShouldPersistTaps='always'
                  styles={{
                      textInputContainer: {
                          width: &quot;90%&quot;,
                          //top: 8,
                          alignSelf: 'center'
                      },
                      textInput: {
                          borderColor: grey,
                          borderWidth: 1,
                          borderRadius: 5,
                          height: 48,
                          paddingBottom: 8,
                          color: black,
                          fontSize: 16,
                      },
                      predefinedPlacesDescription: {
                          color: '#1faadb',
                      },
                  }}
              /&gt;
  &lt;/View&gt;
          &lt;View style={style.mapContainer}&gt;
              &lt;MapView 
                  style={style.map} 
                  region={region}
                  onRegionChangeComplete={region =&gt; setRegion(region)}
              &gt;
              &lt;Marker coordinate={{ 
                  latitude: latitude , 
                  longitude: longitude, 
              }}&gt;&lt;/Marker&gt;
              &lt;/MapView&gt;
          &lt;/View&gt;
  </code></pre>
  <p>I have tried other methods based on stackoverflow's answers but they seem to be outdated and I can't run them</p>