[Tilecache] Setting up a TMS Server

Nathan Boettcher NathanB at lawtonprinting.com
Mon May 12 19:43:02 EDT 2008


I am not sure but I believe the structure is different.  I am trying to set
it up through OpenLayers using Tilecache but so far no luck.  I tried the
ImageLayer and used a TMS style request/layer in OpenLayers (like you
suggested) and get this error:
 
An error occurred: No module named PIL.Image
  File "G:\webs\miscWebs\mapserver\TileCache\Service.py", line 102, in _load
    cache = cache)
  File "G:\webs\miscWebs\mapserver\TileCache\Service.py", line 73, in
_loadFromSection
    return section_object(section, **objargs)
  File "G:\webs\miscWebs\mapserver\TileCache\Layers\Image.py", line 13, in
__init__
    import PIL.Image as PILImage
 
 
My code looks like this, just like the simple examples:
 
Tilecache.cfg:
[tilecache_options]
path=G:/webs/miscWebs/mapserver/
 
[cache]
type=Disk
base=G:/webs/miscWebs/mapserver/cache
 
[basic]
type=ImageLayer
file=G:/webs/miscWebs/mapserver/EPearMapB.jpg
bbox=0,0,4000,5038
filebounds=0,0,4000,5038
maxresolution=6
 
OpenLayers javascript code:
    var map, layer;
 
    function init(){
        map = new OpenLayers.Map( 'map', {'maxResolution': 6});
        layer = new OpenLayers.Layer.TMS( "basic",
"http://devmaps/tilecache.py?/", {layersname: 'basic', type:'png'} );
        map.addLayer(layer);
        map.addControl(new OpenLayers.Control.Permalink());
        if (!map.getCenter()) map.zoomToMaxExtent();
    }
 
The map itself is 12.2MB.  I tried both TMS and WMS style requests for the
OpenLayers, both gave the same error.
 
-Nathan
 
> 
>> New to the list and have a question about Tilecache.  According to what
I've
>> read, I can use Tilecache as a TMS server, but I am unsure how.  I have
>> looked at the examples and read the docs and nothing really sticks out.
I
>> have generated a TMS structure of a test map (cartography that was
converted
>> to a regular jpg before I got it) using the gdal2tiles.py tool, but I am
not
>> sure how to plug them into Tilecache for use as a TMS server.  I think
the
>> most important question I have is what 'type' do I use in the config
file.
>> There doesn't seem to be one for TMS that I can see.  The docs don't
detail
>> all of the available config options and values.
> 
>Might be missing something, but isn't the TMS support just another URL
>syntax for WMS tile requests?  Just configure the server as usual
>(using an ImageLayer if you have an existing image), and use a TMS
>client instead of a WMS client.
> 
></F>

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/tilecache/attachments/20080512/29c9dc14/attachment.html


More information about the Tilecache mailing list