问题
I have an OpenStreetMap server that uses TileCache to serve tiles. The tiles are generated with Mapnik. I have configured the Mapnik XML stylesheet and I can generate an image with the OSM Mapnik tool 'generate_image.py'. That image is correct and looks good.
My TileCache server will serve tiles from my OSM layer; however, all I get are tiles with the background/water blue. I get no land forms, I get no street data. Can anybody help with this?
TileCache Config:
[osm]
type=Mapnik
mapfile=/var/maps/bin/mapnik/osm.xml
spherical_mercator=true
I am using OpenLayers to show the map. I am using a TMS layer to call the TileCache server. Like I said, I get tiles returned, they are just nothing but blue.
回答1:
This is likely happening because tilecache runs as the apache user (various names) which has different privileges than your normal unix user for which you used to test tile generation with TileLite and generate_image.py.
See http://dbsgeo.com/foss4g2010/html/troubleshooting.html#trouble-postgres-connection for advice, but know this is simply a postgres issue and it is up to you to decide how to configure and your necessary security needs.
来源:https://stackoverflow.com/questions/6113740/tilecache-with-mapnik-for-openstreetmap