Hi,<br><br>I am trying to use OpenLayers with image times generated from generate_tiles.py (mapnik folder of openstreetmap).<br><br>With my setup, OL is looking for the following files:<br><div class="logRow logRow-info"><span class="objectBox objectBox-text"><a href="http://localhost:3000/tiles/basic/00/000/000/000/000/000/000.png">http://localhost:3000/tiles/basic/00/000/000/000/000/000/000.png</a></span><a class="objectLink objectLink-sourceLink"><br>
</a></div><span class="objectBox objectBox-text"><a href="http://localhost:3000/tiles/basic/00/000/000/001/000/000/000.png">http://localhost:3000/tiles/basic/00/000/000/001/000/000/000.png</a></span><span class="objectBox objectBox-text"><br>
<br>My tiles are:<br></span><span class="objectBox objectBox-text"><a href="http://localhost:3000/tiles/basic/0/0/0.png">http://localhost:3000/tiles/basic/0/0/0.png</a><br>etc.<br><br>There are two problems here:<br>1) OL is looking a deeper directory structural than I've got<br>
2) OL is looking for files with leading zeros<br><br><br>My OL setup code:<br>layer = new OpenLayers.Layer.TileCache("TileCache Layer",<br> ["<a href="http://localhost:3000/tiles">http://localhost:3000/tiles</a>"],<br>
"basic",<br> {<br> 'format': 'image/png',<br> maxResolution: 180/256 // same as the TileCache config<br> }<br> );<br>
<br>My generate_tiles.py setup code:<br> bbox = (-180.0,-90.0,180.0,90.0)<br> minZoom = 0 <br> maxZoom = 16<br> render_tiles(bbox, mapfile, tile_dir, minZoom, maxZoom)<br><br>In generate_tiles.py, I am saving files by calling 'view.save..) as suggested by OSM wiki. <a href="http://wiki.openstreetmap.org/index.php/Mapnik#Rendering_with_Mapnik">http://wiki.openstreetmap.org/index.php/Mapnik#Rendering_with_Mapnik</a><br>
<br>My image tiles are PNGs and 512x512.<br><br></span><span class="objectBox objectBox-text">I have been trying to solve this for a while. I'm pretty stuck now. Can anyone shed some light on this?</span><br><br>Any help is much appreciated.<br>
<br>Xin<br>