title: Geocoder v3 Autocomplete Hotel
body: <p>We are running a website (www.taxileader.net/taxi-tegel.html) , where people can book a taxi from the airport to their destination.</p>
  
  <p>To book and calculate the distance between the starting address that normally is an Airport (latitude/longitude already in our database) and their destination we use google map v3</p>
  
  <p>In the "destination field" we already have an autocomplete to extract the zip (or postcode)  from the address our customers are writing in,  BUT we need them to find as well the hotel's zip.</p>
  
  <p>The API call we use to take the address information is geocoder v3, is this wrong or is there something else we have to put to find hotels?</p>
  
  <pre><code>$("#txt_indirizzo").autocomplete({
      //This bit uses the geocoder to fetch address values
      source : function(request, response) {
          geocoder.geocode({
              'address' : request.term,
              'bounds' : bound
          }, function(results, status) {
              response($.map(results, function(item) {
                  var zip = '';
                  for (var i in item.address_components) {
                      if (item.address_components[i].types[0] == 'postal_code' || item.address_components[i].types[1] == 'postal_code') {
                          zip = item.address_components[i].long_name;
                      }
                  }
                  if (zip == '') {
                      return;
                  } else {
                      return {
                          value : item.formatted_address,
                          latitude : item.geometry.location.lat(),
                          longitude : item.geometry.location.lng(),
                          zip : zip
                      }
                  }
  
              }));
          })
      },
      //This bit is executed upon selection of an address
      select : function(event, ui){
          if (tipoDiTrasf == 2) {
              return;
          }
  
          chk_txt_indirizzo = true;
          if (ui.item.zip != '') {
  
              chkPostcode(ui.item.zip, ui.item.latitude, ui.item.longitude, ui.item.value, '#txt_indirizzo');
  
          } else {
              alert('Questo non è un indirizzo valido');
              setTimeout('$("#txt_indirizzo").val("")', 5);
          }
          tab(1);
      },
      change : function() {
          if (!chk_txt_indirizzo) {
              $("#txt_indirizzo").val('').data("autocomplete").term = "";
              zip_indirizzo = pointLat2 = pointLon2 = setIndirizzo = false;
              putondinNam();
  
          }
      }
  });
  </code></pre>
  
  <p>At least is there a way to have the google maps autocomplete to cities only? </p>
  
  <p>I mean in the "cities field" we want to show only cities and not addresses</p>
  
  <p>Many thanks</p>