Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5954583
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T17:59:30+00:00 2026-05-22T17:59:30+00:00

I have been trying for two and a half weeks so far to get

  • 0

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:

[osm]
type=Mapnik
mapfile=/var/maps/bin/mapnik/osm.xml
spherical_mercator=true
bbox=-16697000,8610000,-16667000,8640000
maxResolution=156543.0339/4
levels=18
srs=EPSG:900913

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T17:59:30+00:00Added an answer on May 22, 2026 at 5:59 pm

    Nik,

    I can understand the potential difficulties here and that you’ve tried a number of things. You did not say what exact problems you ran into however, so I’ll guess that this is your problem:

    • You are using OpenLayers to test that the tiles are being produced correctly, but things don’t line up when you connect to the tiles generated by TileCache.

    That it? If not, please provide a bit more detail.

    If that is the problem then likely what you need to do is to make sure to use a “TMS” layer type in OpenLayers and to match that with your TileCache.cfg layer params. “TMS” is very similar to the OSM tile scheme except that the y value is flipped.

    Anyway, something like this should work:

    tilecache.cfg

    [osm]
    type=Mapnik
    mapfile=/full/path/to/osm.xml
    spherical_mercator=true
    

    OpenLayers Layer

    var tms = new OpenLayers.Layer.TMS("TileCache TMS Layer","http://localhost:8000/",
                    { serviceVersion: "1.0.0", layername: "osm",  type: "png" });
    map.addLayers([tms]);
    

    I pulled this from an old example of mine from the first time I got this working: http://mapnik-utils.googlecode.com/svn/example_code/tilecache/openlayers_osm.html

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am still trying to get my server running OpenStreetMap. I have TileCache and
I have been trying for what seems like two days now to get my
I have been trying in vain for almost two weeks now to generate a
I have been trying to get a string between two strings in a line.
So, I have been trying to fix this for about two months. It all
I have been trying to get around this error for a day now and
Here is a hard one I have been trying to get it work. It
I have been trying to compare two arrays. Using array_intersect presents no problems. When
I keep on having these same two problems. I have been trying to use
I have been trying to create an array of a class containing two values,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.