title: Change value of Google Maps Autocomplete field
body: <p>How do I change the value of a Google Maps autocomplete field after the value has been changed?</p>
  
  <p>My ultimate desire is to just show the address in this field, and the city, state, etc in separate fields.</p>
  
  <p>As seen by <a href="http://jsbin.com/wiye/2/" rel="noreferrer">http://jsbin.com/wiye/2/</a> (script duplicated below), I change the value, but it later changes back.</p>
  
  <p><a href="https://stackoverflow.com/questions/13524258/show-just-the-street-address-in-google-maps-event-addlistener">show just the street address in google.maps.event.addListener()</a> asks the same question, but it no longer appears to work.  <a href="https://stackoverflow.com/questions/13925008/change-the-value-in-textbox-of-a-google-map-autocomplete">Change the value in textbox of a google map autocomplete</a> also asks the same question, but doesn't have an adequate answer.</p>
  
  <p>Thank you</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
      &lt;head&gt;
          &lt;meta charset="utf-8"&gt;
          &lt;title&gt;Places search box&lt;/title&gt;
          &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.js" type="text/javascript"&gt;&lt;/script&gt;
          &lt;script src="https://maps.googleapis.com/maps/api/js?v=3.exp&amp;sensor=false&amp;libraries=places"&gt;&lt;/script&gt;
          &lt;script&gt;
              $(function(){
                  var input_auto = document.getElementById('input_auto');
                  autocomplete = new google.maps.places.Autocomplete(input_auto,{types: ['geocode'],radius: 10});
                  google.maps.event.addListener(autocomplete, 'place_changed', function() {
                      setTimeout(function(){$('#input_auto').val('yyy');},50);
                      alert('pause1');
                      console.log(autocomplete,input_auto);
                      input_auto.value='xxx';
                      //autocomplete.set('xxx');
                      //autocomplete.setValues('xxx');
                      alert('pause2');
                  });
              });
  
          &lt;/script&gt;
      &lt;/head&gt;
      &lt;body&gt;
          &lt;input id="input_auto" type="text"&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>