title: Google Places Api: Not able to display all search results
body: <p>I am unable to display all the results requested from the Google Places Api..</p>
  
  <pre><code>var Latlng = new google.maps.LatLng(Latitute, Longitute);
          map = new google.maps.Map(document.getElementById('map_canvas'), {
                      mapTypeId: google.maps.MapTypeId.ROADMAP,
                      center: Latlng,
                      zoom: 10});
          var request = {location: Latlng,types: [type]};
          var service = new google.maps.places.PlacesService(map);
          service.search(request, callback);
    }
  
    function callback(results,status,pagination) {
      if (status == google.maps.places.PlacesServiceStatus.OK) {
      for (var i = 0; i &lt; results.length; i++) {
          createMarker(results[i]);
          }
          if (pagination.hasNextPage) {
           pagination.nextPage(); }}}
  
     function createMarker(place) {
              var placeLoc = place.geometry.location;
              var marker = new google.maps.Marker({map: map,zIndex: 100,position: place.geometry.location});
              var request = {reference : place.reference,};
              service = new google.maps.places.PlacesService(map);
              service.getDetails(request, function detailsDisplay(details, status){
                  if (status === google.maps.places.PlacesServiceStatus.OK) {
                      console.log(status);
                      $('#placesdata').append('&lt;tr&gt;&lt;td&gt;&lt;a href='+details.url+'&gt;' + details.name+ '&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;');
                  } else if (status === google.maps.GeocoderStatus.OVER_QUERY_LIMIT) {
                      setTimeout(function() {
                      createMarker(place);
                      }, 200);}});} };
  </code></pre>
  
  <p>i used pagination and getting 60 results but only can display 20..and 40 using settimeout() function...getting the following error: Uncaught TypeError: Cannot read property 'length' of null. Any clue?</p>