[Tilecache] mapnik + tilecache + openlayers

kryptonite paschatap at gmail.com
Tue May 19 14:14:07 EDT 2009


Well sorry I got you all confused. Well, I was able to run the sample from
http://trac.mapnik.org/wiki/XMLGettingStarted like you had mentioned
earlier. I got the script to run, have the xml and got the png files too.
Now the part where I am stuck basically is having to show the map using
openlayers. The tiles are just pink and there are no tiles in the cache
whose path in my case is C:\tmp\tilecache. The layer folder which I
indicated is the folder that should be created in the cache- it holds all
the tiles - , the name of the folder being the layer specified in the
tilecache.cfg file. 




Dane Springmeyer wrote:
> 
> 
> On May 18, 2009, at 1:02 PM, kryptonite wrote:
> 
>>
>> Hi,
>>   I have been trying for the past few days to get a simple map to  
>> display
>> with mapnik+tilecache+openlayers. I have installed mapnik , and got  
>> the
>> default rundemo.py running , map.xml being one that was generated.  
>> the image
>> files were generated too like the documentation on mapnik says.
> 
> Great, keep in mind however that those shapefiles that come with the  
> 'rundemo.py' are in a fairly unique lambert projection. It may be  
> easier to try to start with the XML from
> http://trac.mapnik.org/wiki/XMLGettingStarted 
>   that works with a world borders shapefile in EPSG 4326.
> 
> 
>> I have also
>> successfully displayed a map using openlayers and tilecache but this  
>> time
>> was with mapserver.
>>   But coming to the main problem which is using
>> tilecache+openlayers+mapnik. Now all i did in the tilecache.cfg was  
>> include
>> a layer like this:
>>
>> [testlayer]
>> type=Mapnik
>> mapfile=C:\mapnik_0_6_0\demo\python\map.xml
>> bbox=-8024477.28459,5445190.38849,-7381388.20071,5662941.44855
>> maxResolution=2545.4906698
>> extent_type=loose
>> srs=EPSG:900913
>>
> 
> One problem here is that the TileCache Mapnik layer does not respect  
> the 'srs' parameter. We need to add this support in the future. In the  
> meantime you need to specify the projection with the 'projection'  
> parameter and the epsg 900913 proj4 literal as the value:
> 
> [test]
> type=Mapnik
> mapfile=/path/to/mapfile.xml
> projection= +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0  
> +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs +over
> # bbox for global extent of epsg 900913
> bbox=-20037508.34, -20037508.34, 20037508.34, 20037508.34
> 
> Also, how are you coming up with the maxRes and bbox?
> 
> Dane
> 
> 
> _______________________________________________
> Tilecache mailing list
> Tilecache at openlayers.org
> http://openlayers.org/mailman/listinfo/tilecache
> 
> 

-- 
View this message in context: http://n2.nabble.com/mapnik-%2B-tilecache-%2B-openlayers-tp2935333p2941314.html
Sent from the TileCache mailing list archive at Nabble.com.




More information about the Tilecache mailing list