title: Autocomplete locations only without radio buttons
body: <p>I found a script from one of my colleague.</p>
  
  <p>All I want is an autocomplete from Google maps for the locations in United states and Canada. I saw that I cannot add multiple countries in <code>componentRestrictions</code> but, if you know a workaround that would be of great help too.</p>
  
  <p>The Script which I have here is :</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
    &lt;head&gt;
      &lt;title&gt;Google Maps JavaScript API v3 Example: Places Autocomplete&lt;/title&gt;
      &lt;script src="https://maps.googleapis.com/maps/api/js?sensor=false&amp;libraries=places"&gt;&lt;/script&gt;
      &lt;style&gt;
        body {
          font-family: sans-serif;
          font-size: 14px;
        }
        #map_canvas {
          height: 400px;
          width: 600px;
          margin-top: 0.6em;
        }
        input {
          border: 1px solid  rgba(0, 0, 0, 0.5);
        }
        input.notfound {
          border: 2px solid  rgba(255, 0, 0, 0.4);
        }
      &lt;/style&gt;
      &lt;script&gt;
        function initialize() {
          var input = document.getElementById('searchTextField');
          var options = {
              types: ['(cities)'],
              componentRestrictions: {country: 'us'}
          };
  
          var autocomplete = new google.maps.places.Autocomplete(input, options);
  
          // Sets a listener on a radio button to change the filter type on Places
          // Autocomplete.
          function setupClickListener(id, types) {
            var radioButton = document.getElementById(id);
            google.maps.event.addDomListener(radioButton, 'click', function() {
              autocomplete.setTypes(types);
            });
          }
  
          setupClickListener('changetype-all', []);
          setupClickListener('changetype-establishment', ['establishment']);
          setupClickListener('changetype-geocode', ['geocode']);
        }
        google.maps.event.addDomListener(window, 'load', initialize);
      &lt;/script&gt;
    &lt;/head&gt;
    &lt;body&gt;
      &lt;div&gt;
        &lt;input id="searchTextField" type="text" size="50"&gt;
        &lt;input type="radio" name="type" id="changetype-all" checked="checked"&gt;
        &lt;label for="changetype-all"&gt;All&lt;/label&gt;
  
        &lt;input type="radio" name="type" id="changetype-establishment"&gt;
        &lt;label for="changetype-establishment"&gt;Establishments&lt;/label&gt;
  
        &lt;input type="radio" name="type" id="changetype-geocode"&gt;
        &lt;label for="changetype-geocode"&gt;Geocodes&lt;/lable&gt;
      &lt;/div&gt;
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>This script works! But, the problem is, I do not want radio buttons and when I remove them and relevant script, it stops working completely!</p>
  
  <p>I just want auto complete without anything else around it.
  Again, this script is not written by me.</p>
  
  <p>EDIT:</p>
  
  <p>My question is related to <a href="https://gis.stackexchange.com/questions/31916/i-am-trying-to-put-autocomplete-of-google-api-v3-for-places-but-giving-some-err">https://gis.stackexchange.com/questions/31916/i-am-trying-to-put-autocomplete-of-google-api-v3-for-places-but-giving-some-err</a>
  which Google gave me... although even that chap is struggling :(</p>