title: Multiple Google Autocomplete and Places Search Issue
body: <p>I am in need of some help regarding Google Maps API and using Autocomplete and Address complete. </p>
  
  <p>This is currently my code:</p>
  
  <p><strong>JS</strong></p>
  
  <pre><code>function fillInAddress(show) {
                      console.log(show);
                      var place = autocomplete.getPlace();
                      for (var i = 0; i &lt; place.address_components.length; i++){
                          var base = place.address_components[i].types[0];
                          if(base === "postal_code"){
                              console.log(place.address_components[i].long_name);
                          }
                      }
                  }
  
  function initialize(out) {
              autocomplete = new google.maps.places.Autocomplete(
                      (document.getElementById(out)),
                      {types: ['geocode']});
              google.maps.event.addListener(autocomplete, 'place_changed', function () {
                  fillInAddress(out);
              });
          }
          initialize("from");
          initialize("to");
  </code></pre>
  
  <p><strong>HTML</strong></p>
  
  <pre><code>&lt;input type="text" id="from" class="location"&gt;
  &lt;input type="text" id="to" class="location"&gt;
  &lt;input id="fromPc" type="text"&gt;
  &lt;input id="toPc" type="text"&gt;
  </code></pre>
  
  <p>The places dropdown is working perfectly and allows you to type and then will come up with the suggestions fine. </p>
  
  <p>However when I click on one of the suggestions in the from input I get this error in the console.</p>
  
  <pre><code>Uncaught TypeError: Cannot read property 'address_components' of undefined
  </code></pre>
  
  <p>But when I do it in the To input box it works fine and returns the postcode.</p>
  
  <p>If I then go back to the first input "from" and then enter the address again it returns a postcode this time but it returns the postcode from the second input "to".</p>
  
  <p>Does anyone know how to resolve this. </p>
  
  <p>I appreciate your help in advance!</p>