title: fill google maps autocomplete with prediction results
body: <p>What I have at the moment is a place autocomplete which displays results for one country.
  What I want to do is make it display results for more countries (limited to 2 or 3).</p>
  
  <p>As I understand it, this is not possible with the current version of the autocomplete ( <a href="https://code.google.com/p/gmaps-api-issues/issues/detail?id=4233" rel="nofollow noreferrer">https://code.google.com/p/gmaps-api-issues/issues/detail?id=4233</a>)
  So what I'm going to do is get two lists of predictions and display those instead of the autocomplete result.</p>
  
  <p>Is there any way to trigger the dropdown part of the autocomplete and populate it with the predictionslist?</p>
  
  <p>triggered code in the onChange of the input:</p>
  
  <pre><code>var inputData  = this.value;
  var options = {
          componentRestrictions: { country: "be" }
  };
  service = new google.maps.places.AutocompleteService();
  var request = {
      input: inputData,
      componentRestrictions: {country: 'be'},
  };
  var secondaryRequest = {
      input: inputData,
      componentRestrictions: {country: 'lu'},
  };
  service.getPlacePredictions(request, callback);
  service.getPlacePredictions(secondaryRequest, callback);
  </code></pre>
  
  <p>callback function:</p>
  
  <pre><code>function callback(predictions, status) {
    if (status != google.maps.places.PlacesServiceStatus.OK) {
      alert(status);
      return;
    }  
      //here I need to display that dropdown if it isn't already
      // and then add the results of the current predictions.
  }
  </code></pre>
  
  <p><strong>UPDATE</strong></p>
  
  <p>Multiple countries filter in place autocomplete was introduced in version 3.27 of Maps JavaScript API in January 2017:</p>
  
  <blockquote>
    <p>You can now restrict Autocomplete predictions to only surface from multiple countries. You can do this by specifying up to 5 countries in the componentRestrictions field of the AutocompleteOptions.</p>
  </blockquote>
  
  <p>source: <a href="https://developers.google.com/maps/documentation/javascript/releases#327" rel="nofollow noreferrer">https://developers.google.com/maps/documentation/javascript/releases#327</a></p>