[Tilecache] Mod python+ Apache + tilecache 2.04 No map display

Xiaoyu Guan guanxiaoyu at gmail.com
Fri Jul 18 05:16:29 EDT 2008


Dear all
I have setup Mod python with Apache 2.2 (Python 2.5) . from the test page, I
am sure mod python it works
then I try to setup TileCache 2.04
after download setuptools-0.6c8-py2.5.egg
At first, I copy Tilecache 2.04 to /Apache2.2/cgi-bin/, use terminal  run
setup.py, seem like nothing works, then I copy all the file to
/Apache2.2/htdocs/tilecache , run setup.py again.

according to some tutorials online, I have configured my Apache like this:

1. Add
<Directory "C:/Program Files/Apache Software
Foundation/Apache2.2/htdocs/tilecache">
        AddHandler python-program .py
        PythonHandler TileCache.Service
        PythonOption TileCacheConfig "C:/Program Files/Apache Software
Foundation/Apache2.2/htdocs/tilecache/tilecache.cfg"
        PythonPath "['c:\Program Files\Apache Software
Foundation\Apache2.2\htdocs\tilecache'] + sys.path"
        PythonDebug On
</Directory>

to Apache httpd.conf, restart apache, no error
beside that tilecache.cfg modified like this

[cache]
type=DiskCache
base= c:\tilecache2

2. Change some python script header to  #!C:/Python25/python.exe -u

3. I changed tilecache.cgi into tilecache.py (under
/Apache2.2/htdocs/tilecache/)index.html openlayers script like this
        var map, layer;

        function init(){
            map = new OpenLayers.Map( $('map'), {'maxResolution': 360/512});
            layer = new OpenLayers.Layer.WMS( "VMap0",
                    "/tilecache/tilecache.py?", {layers: 'basic', format:
'image/png' } );
            map.addLayer(layer);
            map.addControl(new OpenLayers.Control.Permalink());
            if (!map.getCenter()) map.zoomToMaxExtent();
        }

4. when I open http://127.0.0.1/tilecache/tilecache.py without error
message, but follow xml codes
  <?xml version="1.0" encoding="UTF-8" ?>
 - <#> <Services>
   <TileMapService version="*1.0.0*" href="*http://127.0.0.1/1.0.0/*" />
  </Services>



now I could not find where error is ? is there anybody have same problems
before ?
Thanks in advance

All the best
-- 
Xiaoyu Guan (Sam)
Geo-information Science
Wageningen UR
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/tilecache/attachments/20080718/de974ebb/attachment.html


More information about the Tilecache mailing list