title: Convert a single large image overlay to tiles for Google Maps
body: <p>I have a large high-resolution image that I am using for an overlay using Google Maps v3 API.  This works fine for desktop and laptop computers with a reasonable network connection, but unsurprisingly it does not work so well for mobile users.</p>
  
  <p>What's the best/easiest way to break the image up into 2D tiles at the various zoom levels so I can act as a tile server for Google Maps via the API?  </p>
  
  <p>Is there a program that will reliably generate the tiles for me and provide me with the necessary zoom and coordinates for each resulting tile and/or give me the correct tile if I provide the zoom and coordinates?  </p>
  
  <p>Is it pretty easy to write a tile server to do it on the fly once you gather the right info?  Perhaps there's source code out there that I can use as a model?  (I found a tile server at <a href="http://blog.gmapify.fr/a-map-tile-server-part-2-understanding-google-maps-tile-overlays-and-building-up-a-tile-server">http://blog.gmapify.fr/a-map-tile-server-part-2-understanding-google-maps-tile-overlays-and-building-up-a-tile-server</a> which is certainly helpful, but it doesn't serve tiles from a source image, so I'd have to at least figure that part out...) </p>
  
  <p>Or perhaps there is step-by-step algorithm that I can manually follow if that's more straightforward?  (Since it's only one image and it covers an area on the map of maybe a square mile, manually doing it like that is perhaps feasible if not preferable.)</p>