title: Use componentRestrictions to just one state in Google Maps
body: <p>I am trying to use <code>componentRestrictions</code> in Google Places autocomplete. I can restrict by country, but when I try to restrict by administrative area, the whole thing crashes.</p>
  
  <pre class="lang-js prettyprint-override"><code>var options = {
      componentRestrictions: { administrativeArea: 'TX' }
  };
  
  var autocomplete = new google.maps.places.Autocomplete(input, options);
  
  google.maps.event.addListener(autocomplete, 'place_changed', function () {
      var place = autocomplete.getPlace();
      if (!place.geometry) {
          return;
      }
  
      var address = '';
      if (place.address_components) {
          address = [
            (place.address_components[0] &amp;&amp; place.address_components[0].short_name || ''),
            (place.address_components[1] &amp;&amp; place.address_components[1].short_name || ''),
            (place.address_components[2] &amp;&amp; place.address_components[2].short_name || '')
          ].join(' ');
      }
  
  });
  </code></pre>