[OpenLayers-Users] tile images and leading zeros
Xin
xin at zenpow.com
Tue Feb 26 12:32:49 EST 2008
Hi,
I am trying to use OpenLayers with image times generated from
generate_tiles.py (mapnik folder of openstreetmap).
With my setup, OL is looking for the following files:
http://localhost:3000/tiles/basic/00/000/000/000/000/000/000.png
http://localhost:3000/tiles/basic/00/000/000/001/000/000/000.png
My tiles are:
http://localhost:3000/tiles/basic/0/0/0.png
etc.
There are two problems here:
1) OL is looking a deeper directory structural than I've got
2) OL is looking for files with leading zeros
My OL setup code:
layer = new OpenLayers.Layer.TileCache("TileCache Layer",
["http://localhost:3000/tiles"],
"basic",
{
'format': 'image/png',
maxResolution: 180/256 // same as the TileCache config
}
);
My generate_tiles.py setup code:
bbox = (-180.0,-90.0,180.0,90.0)
minZoom = 0
maxZoom = 16
render_tiles(bbox, mapfile, tile_dir, minZoom, maxZoom)
In generate_tiles.py, I am saving files by calling 'view.save..) as
suggested by OSM wiki.
http://wiki.openstreetmap.org/index.php/Mapnik#Rendering_with_Mapnik
My image tiles are PNGs and 512x512.
I have been trying to solve this for a while. I'm pretty stuck now. Can
anyone shed some light on this?
Any help is much appreciated.
Xin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080226/f4f49107/attachment.html
More information about the Users
mailing list