[Tilecache] Transparency issue again

Tobias Weiß tobias.weiss at pik-potsdam.de
Wed Jan 20 09:07:14 EST 2010


Hello Tilecachers,

I am new to this list. I am developing map applications using Google
Maps, OpenlLayers & MapServer. Now I want to improve performance and
installed Tilecache that runs fine under mod_python. I can render tiles
successfully but can´t get them transparent. I have searched through the
list but couldn´t find a solution to my problem. Don´t know if this
maybe derives from the fact that I use type=MapServer instead of
type=WMS in my tilecache.cfg to request a layer. As far as I read the
other posts, getting transparent tiles works by appending
"transparent=true" to the WMS url but this doesn´t seem to work with
type=MapServer.

Ok, this is my code:

#######

JavaScript:

new
OpenLayers.Layer.WMS("name","http:/localhost/cgi-bin/tilecache/tilecache.py,
                                                                       
                                    {
                                                                       
                                    maxExtent:new
OpenLayers.Bounds(-198,-115.542749339137,198,109.146905833277),
                                                                       
                                    maxResolution:156543.0339,
                                                                       
                                    layers:"worldtest",
                                                                       
                                    format: 'image/png',
                                                                       
                                    transparent:true
                                                                       
                                    });

#########

tilecache.cfg

[worldtest]
layers = country
spherical_mercator = yes
extension = png
mapfile = /mymaps/world_test.map
transparent = true
data_extent = -198.0,-115.542749339,198.0,109.146905833
type = MapServer
metatile = no
srs = EPSG:4326
metabuffer =
10,10                                                              
bbox = -198.0,-115.542749339,198.0,109.146905833
metasize = 5,5
extent_type=loose

# Some extracts from my world_test.map

WEB
    LOG world_test.log
    IMAGEPATH ''
    IMAGEURL ''
METADATA
     WMS_ONLINERESOURCE 'http://?map=world_test.map'
     WMS_SRS 'EPSG:4326 EPSG:900313'
     WMS_ACCESSCONSTRAINTS 'none'
     WMS_TITLE 'WMSTitel'
     WMS_FEATURE_INFO_MIME_TYPE 'text/html'
     WMS_ABSTRACT 'WMSmetatext'
END  #METADATA

This code is working fine, just transparency is missing. A single tiles
url is e.g the following:
http://localhost/cgi-bin/tilecache/tilecache.py?MAXEXTENT=left-bottom%3D%28-198%2C-115.542749339137%29%20right-top%3D%28198%2C109.146905833277%29&MAXRESOLUTION=156543.0339&LAYERS=worldtest&FORMAT=image%2Fpng&TRANSPARENT=true&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&SRS=EPSG%3A900913&BBOX=-0.003589194267988205,-0.003589194267988205,10018754.166010806,10018754.166010806&WIDTH=256&HEIGHT=256

I read somewhere that MapServer needs to be configured to work as a Web
Map Service (WMS) provider in order to work with Tilecache. I checked my
MapServer and as far as I see it supports WMS.

I there something wrong in my tilecache.cfg?

Best,
Tobias


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/tilecache/attachments/20100120/0616177b/attachment.html


More information about the Tilecache mailing list