Imported data by using Osm2pgsql, to get rid off all problems related to data conversion, I stored this as latlong (-l parameter). I created a stylesheet, and I tested with Python script and it was working (so both data and stylesheet should be fine).

Here comes problem... when I tried to use it with OpenLayers, I got my basic layer covered by pinkish "image not found" tile, but when I try to access tile by calling cgi script "http://localhost/tc/tilecache.cgi/1.0.0/osm/5/31/26.png" I have a nicely generated tile.

Does any one have idea what I'm doing wrong?



<Map background-color="#00000000" srs="+proj=latlong +datum=WGS84">
  <Style name="roadStyle">
      <LineSymbolizer stroke="#ff0000" stroke-width="100" />
  <Layer name="roads" srs="+proj=latlong +datum=WGS84">
       <Parameter name="table">
       (select way,highway from planet_osm_line where highway in ('motorway','motorway_link','trunk','trunk_link','primary','primary_link','secondary','secondary_link','tertiary','tertiary_link','residential','unclassified') order by z_order) as roads
      <Parameter name="type">postgis</Parameter>
      <Parameter name="user">www-data</Parameter>
      <Parameter name="password">gis</Parameter>
      <Parameter name="dbname">gis</Parameter>
      <Parameter name="estimate_extent">true</Parameter>





Definition of my layers:

var map = new OpenLayers.Map('map',
        numZoomLevels: 12,
        projection: new OpenLayers.Projection("EPSG:4326"),
        displayProjection: new OpenLayers.Projection("EPSG:4326")
var layer = new OpenLayers.Layer.WMS( "VMap0", 
        "tilecache.cgi?", {layers: 'basic', format: 'image/png' } );
var tms = new OpenLayers.Layer.WMS( "osm","tilecache/tilecache.cgi?",
      { layers:'osm',  format: 'image/png'},{ isBaseLayer: false}  );  

1 Answer 1


Not enough reputation so can't add a comment.

There can be multiple reasons behind it,

Firstly, did you check the server logs? Apache for instance. Might be an issue with the permissions.

Also, I am not much aware of TileCache have been using ModTile and Renderd (http://wiki.openstreetmap.org/wiki/Mod_tile) so not aware of the logging of TileCache. Can you check tilecache logs?

Also, make sure you have configured your server (Apache in my case) properly with TileCache

Hope that helps.

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.