Thank you for the quick reply Chris. It helped a lot.<br><br>I am new to this and wasn&#39;t sure how to use tiles. So I searched for tiles on the example page, and TileCache came up. That&#39;s how I got to use it!<br><br>
Using  <a href="http://trac.openlayers.org/wiki/UsingCustomTiles">http://trac.openlayers.org/wiki/UsingCustomTiles</a>, OL is accessing tiles in the right format now. But the exact file name does not match with what I produced from a certain bounding box and zoom range. I fear it&#39;s projection issues.<br>
<br>My updated JS:<br><a href="http://pastie.caboo.se/158268">http://pastie.caboo.se/158268</a><br><br>As you can see, I have set the options for Google-like tiles.<br><br>My generate_tiles.py configs:<br>&nbsp;&nbsp;&nbsp; minZoom = 10<br>
&nbsp;&nbsp;&nbsp; maxZoom = 16<br>&nbsp;&nbsp;&nbsp; bbox = (16.981109375,-22.6169453125,17.156890625,-22.5290546875)<br>&nbsp;&nbsp;&nbsp; render_tiles(bbox, mapfile, tile_dir, minZoom, maxZoom)<br><br>The lat/lng from JS and bbox from generate_tiles are of the same place.<br>
<br>At default zoom (14), some of the tiles OL&#39;s looking for are:<br><div class="logRow logRow-info"><span class="objectBox objectBox-text"><a href="http://localhost:3000/tiles/14/8193/8188.png">http://localhost:3000/tiles/14/8193/8188.png</a></span><a class="objectLink objectLink-sourceLink"><br>
</a></div><div class="logRow logRow-info"><span class="objectBox objectBox-text"><a href="http://localhost:3000/tiles/14/8192/8188.png">http://localhost:3000/tiles/14/8192/8188.png</a></span><a class="objectLink objectLink-sourceLink"><br>
</a></div><div class="logRow logRow-info"><span class="objectBox objectBox-text"><a href="http://localhost:3000/tiles/14/8191/8188.png">http://localhost:3000/tiles/14/8191/8188.png</a></span><a class="objectLink objectLink-sourceLink"><br>
</a></div><div class="logRow logRow-info"><span class="objectBox objectBox-text"><a href="http://localhost:3000/tiles/14/8190/8188.png">http://localhost:3000/tiles/14/8190/8188.png</a></span><a class="objectLink objectLink-sourceLink"><br>
</a></div><div class="logRow logRow-info"><span class="objectBox objectBox-text"><a href="http://localhost:3000/tiles/14/8189/8188.png">http://localhost:3000/tiles/14/8189/8188.png</a><br><br>listing directory 14:<br>8964&nbsp; 8965&nbsp; 8966&nbsp; 8967&nbsp; 8968&nbsp; 8969&nbsp; 8970&nbsp; 8971&nbsp; 8972<br>
<br></span></div><span class="objectBox objectBox-text"></span>It&#39;s so close! but not quite it. Can anyone offer any advice?<br><br>Any help is much appreciated.<br><br>Xin<br><br><br><br><div><span class="gmail_quote">On 26/02/2008, <b class="gmail_sendername">Christopher Schmidt</b> &lt;<a href="mailto:crschmidt@metacarta.com">crschmidt@metacarta.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On Tue, Feb 26, 2008 at 05:32:49PM +0000, Xin wrote:<br> &gt; Hi,<br> &gt;<br> &gt; I am trying to use OpenLayers with image times generated from<br> &gt; generate_tiles.py (mapnik folder of openstreetmap).<br> &gt;<br> &gt; With my setup, OL is looking for the following files:<br>
 &gt; <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><br> &gt; <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><br>
 &gt;<br> &gt; My tiles are:<br> &gt; <a href="http://localhost:3000/tiles/basic/0/0/0.png">http://localhost:3000/tiles/basic/0/0/0.png</a><br> &gt; etc.<br> &gt;<br> &gt; There are two problems here:<br> &gt; 1) OL is looking a deeper directory structural than I&#39;ve got<br>
 &gt; 2) OL is looking for files with leading zeros<br> <br> <br>Why are you using OpenLayers.Layer.TileCache? Use TMS; speciically, you<br> probably want something like<br> <a href="http://trac.openlayers.org/wiki/UsingCustomTiles">http://trac.openlayers.org/wiki/UsingCustomTiles</a> or the<br>
 Spherical-mercator example.<br> <br> Regards,<br> <br>--<br> Christopher Schmidt<br> MetaCarta<br> _______________________________________________<br> Users mailing list<br> <a href="mailto:Users@openlayers.org">Users@openlayers.org</a><br>
 <a href="http://openlayers.org/mailman/listinfo/users">http://openlayers.org/mailman/listinfo/users</a><br> </blockquote></div><br>