I have been trying for two and a half weeks so far to get a local copy of OpenStreetMap running on a server. I have downloaded the planet file and imported it into a PostGIS database called 'osm'. I have used OSM Mapnik tools to generate an XML stylesheet for Mapnik to use. I have used TileLite to prove that Mapnik can render OSM tiles from the database. The tiles even look the way that I want them to look.

My problem now is that I cannot get TileCache to work with Mapnik. I have a MapServer instance installed that I am using to serve Shapefiles. This works with TileCache. The default 'basic' layer in the TileCache configuration file works as well. Please help with my OSM layer:


I have read every last blog post, forum post, and tutorial I can find. Any help would be appreciated. I suspect I have either missed something or I am doing something stupid. The problem may even be in OpenLayers.


I needed my TileCache configuration to look like this:


I also needed to use a TMS layer type in OpenLayers. Everything is better now!

  • Is this the final answer to your own question? – Mapperz May 24 '11 at 17:38
  • Yeah, as I mentioned, I got the answer over on StackOverflow. – Nik May 24 '11 at 17:46

Is your data in PostGIS in EPSG 900913?


        **Your OSM data in postgis must be in EPSG 900913 or Spherical Mercator**

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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