title: google autocomplete setComponentRestrictions
body: <p>Is there any restriction on setting the <code>setComponentRestrictions</code> value ? Because it is not working while setting dynamic values.</p>
  <h3>Scenario 1 (Works fine)</h3>
  <p>In this scenario I hard coded the county value to search only specific cities in that country.So this works fine when I use hard coded value.</p>
  <pre><code>var input = document.getElementById('searchCity');
  var options = { types: ['(cities)'],componentRestrictions: {country: 'us' }};
  var autoComplete = new google.maps.places.Autocomplete(cityInput,options);`
  </code></pre>
  <h3>Scenario 2 (Not working)</h3>
  <p>In this, I have another text field which I am using to find country using autcomplete and storing the short_code value in shortNameCountry Id.But this is not working when I am passing dynamic value.</p>
  <pre><code>var input = document.getElementById('searchCity');
  var countryOpt = $(&quot;#shortNameCountry&quot;).val().toLowerCase();
  var options = {types: ['(cities)'], componentRestrictions: {country: countryOpt }};
  var autoComplete = new google.maps.places.Autocomplete(input,options);
  </code></pre>
  <p>(I have added my scenarios. But I dont know stackoverflow keep on ask me to add more details. I am just writting this lines to solve that alert.)
  Please help me to solve this issue.</p>