[Tilecache] Use of tileCache with Mapnik

Arnaud Vandecasteele arnaud.sig at gmail.com
Wed Apr 29 07:53:52 EDT 2009


Hi all,

I'm trying to use MapNik and tileCache with my own data.
The facti is i can generate a png file with MapNik but when I try to do the
same thing with TileCache I've only got the background I defined in My XML
Mapfile (<Map srs="+proj=latlong +datum=WGS84" bgcolor="#4682b4">)

My project is very simple and I don't know what is wrong. Could someaone
help to know where i made a mistake.

Here is :

************* my python MapNik file :
import mapnik
mapfile="./mapfile.xml"
m = mapnik.Map(1400, 600)
mapnik.load_map(m, mapfile)
bbox = mapnik.Envelope(mapnik.Coord(-180.0, -75.0), mapnik.Coord(180.0,
90.0))
m.zoom_to_box(bbox)
mapnik.render_to_file(m, './tuto02/world_populationTOTO.png', 'png')


************* my xml file :

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE Map>
<Map srs="+proj=latlong +datum=WGS84" bgcolor="#4682b4">
    <Style name="My_Style">
    <Rule>
        <PolygonSymbolizer>
            <CssParameter name="fill">#c7e9b4</CssParameter>
        </PolygonSymbolizer>
        <LineSymbolizer>
            <CssParameter name="stroke">black</CssParameter>
            <CssParameter name="stroke-width">.1</CssParameter>
        </LineSymbolizer>
    </Rule>
    </Style>
    <Layer name="world" srs="+proj=latlong +datum=WGS84" status="on">
        <StyleName>My_Style</StyleName>
        <Datasource>
            <Parameter
name="file">./data/tuto/TM_WORLD_BORDERS_SIMPL-0.2</Parameter>
            <Parameter name="type">shape</Parameter>
        </Datasource>
    </Layer>
</Map>


************* my TileCache configuration file :
 [world]
type=MapnikLayer
mapfile=/var/www/html/RetD/mapnik/mapfile.xml
layers=world

TileCache generate all the tile but only with the background color.

Best regards and thanks for your help.

Arnaud
-- 
--------------------------------------------------------------------
Van De Casteele Arnaud
72 Rue de la colline des camélias 97400 Saint-Denis
0262 30 67 79 - 0692 23 73 17
SIG - WebMapping - GPS embarqué
Site internet : http://geotribu.net/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/tilecache/attachments/20090429/fc54d589/attachment.html


More information about the Tilecache mailing list