title: How to use Google Places API with a search button?
body: <p>I am using Google Places API in my project. It is working fine when I give some input in a text box and hit "enter" on keyboard. It is showing results. </p>
  
  <p>But, I want to place search button beside the textbox and when I press the search button, the results should be shown. </p>
  
  <p>This is my initialze function.  </p>
  
  <pre><code>function initialize() {
    ...
    google.maps.event.addListener(searchBox, 'places_changed', function() {
  
      // When I hit Enter button the execution directly comes here.
      // I don't know how to work with onClick function for this purpose.
  
      var places = searchBox.getPlaces();
      for (var i = 0, marker; marker = markers[i]; i++) {
        marker.setMap(null);
      }
    }
  }
  </code></pre>