title: Google map api - autocomplete for hotels
body: <p>I try to make input field with google map api aucomplete but to search only for hotels...</p>
  
  <p>I try:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
          google.maps.event.addDomListener(window, 'load', function () {
            var  places = new google.maps.places.Autocomplete(
         (
            document.getElementById('hotel')), {
          types: ['hotel']
        });
             // var places = new google.maps.places.Autocomplete(document.getElementById('hotel'));
              google.maps.event.addListener(places, 'place_changed', function () {
                  var place = places.getPlace();
                  var address = place.formatted_address;
                  var phone = place.formatted_phone_number;
                  var name = place.name;
                  var url = place.website;
                  $('#address').val(address);
                  $('#phone').val(phone);
                  $('#url').val(url);
                  $('#hotel').val(name);
              });
          });
      &lt;/script&gt;
  </code></pre>
  
  <p>but dont work... What can be a solution here?</p>