I've generated tiles for OpenStreetMap .OSM files using Maperitive and quickly consumed them with leaflet (with no tile cache yet). I'm now looking for the right and simple way to do that also with the shapefiles given by OSM.

(Tried TileMill but the generated mbtiles file needs further processing)

2 Answers 2


You can generate tiles from shapefiles using Mapnik. Just specify the shape file as the data source. There's a tutorial at their Github wiki.

You can also try serving the mbtiles using TileStache though it can be a bit of a pain. Another option would be to use landez.

  • thanks, already started this route, seems Maperative still misses some features
    – robi
    Sep 27, 2012 at 14:40
  • Okay. Updated my answer to include options in case you want to try the mbtiles again. Tilemill produces good maps and it's a shame if you can't use them.
    – R.K.
    Sep 27, 2012 at 14:45
  • @robi actually, Maperitive supports shapefiles through its Python API. But I wouldn't say it's a "simple way", since I haven't written docs for it yet ;)
    – Igor Brejc
    Sep 27, 2012 at 15:51
  • Trying now mapnik, it needs as input an XML style file. any ideas how to get a default one suitable for the OSM shapefiles? (the examples on the site are minimal, e.g., only for roads - I need for a full country data)
    – robi
    Oct 11, 2012 at 11:32
  • 1
    Please post it as another question so that others may benefit.
    – R.K.
    Oct 11, 2012 at 15:22

I would like to suggest you to try mapnik node tile_server from this repo: https://github.com/pocketIlmatto/mapnik_node_tile_server

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.