title: Loading 100-200K markers on google map
body: <p>At the moment I'm using Google Maps v.3 API for drawing markers on the map.
  I have around 500 markers in total.</p>
  
  <p>For displaying purposes I use markerCluster and group markers using this tool on the client side in the browser.</p>
  
  <p>However, I plan to expand the locations number and assume it can grow to 100K or even 200K quickly.</p>
  
  <p>I did some stress tests, and realized that current solution basically kills the browser and about 10-20K markers.</p>
  
  <p>So my question what is the best approach to draw that many markers (not necessary google maps)?</p>
  
  <p>I've read posts with similar questions, e.g.:</p>
  
  <p><a href="https://stackoverflow.com/questions/5413122/showing-many-markers-in-google-maps">Showing many markers in Google Maps</a></p>
  
  <p><a href="https://stackoverflow.com/questions/20431170/best-solution-for-too-many-pins-on-google-maps">Best solution for too many pins on google maps</a></p>
  
  <p>Basically people suggest to use some clusterer for display purposes, which I already use.</p>
  
  <p>Or to use fusion tables for retrieving data, which is not an option, as the data has to stay on my server. Also I assume the display functionality is limited with fusion tables.</p>
  
  <p>I'm thinking about implementing the following scenario:</p>
  
  <ul>
  <li><p>on every page zoom / load - send ajax request with bounds of the display view, add about 30% on all sides and retrieve markers, which fall into this geo area only.
  30% is added in case user zooms out, so that I can display other markers around quickly and then retreive further in background the rest around (broader territory)</p></li>
  <li><p>When the number of markers is more than 50 - then I plan to apply clustering for displaying purposes. But as the markerCluster in javascript is quite slow, namely not markerCluster but google itself, as it still applies locations of all the markers, I plan to do clustering on the server side by spliting the bounds of the displayed map in about 15*15 grid and drop markers into particular cells and then basically send to the client clusters with number of markers inside (e.g. like for heatmap). And then to display clusters as markers.</p></li>
  </ul>
  
  <p>Could you please give some insight whoever did similar. Does it makes sense in general. Or is it a stupid approach as ajax requests will be sent to the server on every map zoom and shift and basically overload server with redundant requests?</p>
  
  <p>What I want to achieve is a nice user experience on big datasets of markers (to load in less than 2 secs).</p>