title: Google Places Autocomplete - Types: Geocode, Address, Establishment - Not Working Properly
body: <p>I am trying to set the types in google places autocomplete and it's getting me crazy!</p>
  <p>I want my users to be able to filter there search by typing the address or a establishment they are looking for, but for some reason it's not working properly.</p>
  <p><strong>Code I am using:</strong></p>
  <pre><code>&lt;script defer src=&quot;https://maps.googleapis.com/maps/api/js?libraries=places&amp;key=[my_api_key]&quot;&gt;&lt;/script&gt;
  &lt;script&gt;
      var searchInputStart = 'start_address';
      start_address = new google.maps.places.Autocomplete((document.getElementById(searchInputStart)), {
          types: ['geocode'],
          types: ['address'],
          types: ['establishment']
      });
      google.maps.event.addListener(start_address, 'place_changed', function () {
          var place_start = start_address.getPlace();
          document.getElementById('loc_lat_start').value = place_start.geometry.location.lat();
          document.getElementById('loc_long_start').value = place_start.geometry.location.lng();
          //get_directions to address
          set_route();
      });
  &lt;/script&gt;
  </code></pre>
  <blockquote>
  <p>If I take out --&gt; types: [address] --&gt; it shows the establishments correct, but not the addresses.</p>
  <p>If I take out --&gt; types: [establishement] --&gt; it shows the addresses correct, but not the establishements.</p>
  </blockquote>
  <p>How can my users filter places correctly from typing an address or establishment?</p>
  <p>Can anyone help me please? What am I doing wrong?</p>
  <p>Thank you.</p>