Get tiles from an offline OSM server

Topics: Algorithms
May 22, 2013 at 8:25 PM
Edited May 22, 2013 at 8:26 PM
I read the different discussion about that subject, but while reading it, I had always 1 question that I wasnt sure if I was right. There is something that is not clear to me how BruTile works to get the tile you need from a local tile server.

I hesitate between these 2 concepts:
  1. Create all the tiles (in a .png format) from your OSM you have imported in your database. And the query your send to your server will be to get a specific image from a directory.
  2. No tile is created, but the query I send to my server create a tile from my database and send back this tile to me.
Is it one of these two concepts or I am totally in the blue?