Hello: I've been struggling for a few days to render some tiles with Mapnik. Now my strategy was to use mod_python and Tilecache and then eventually coordinate Tilecache with Openlayers.
I am using Mapnik on a Intel Macbook, Mac OS X, 10.5 and accessing data via network on postgres/postgis on a ppc G5 Mac OS X, 10.5. I followed the instructions on http://mapnik-utils.googlecode.com/svn/example_code/tilecache/readme.txt and also http://www.paolocorti.net/2008/08/06/a-day-with-tilecache-generating-kml-super-overlays/. Anyway, everything went fairly smoothly, (was able to see a [basic] layer in browser and in cache folder) BUT could not render a Mapnik layer (my goal): #Configuration for MC TileCache [cache] type=Disk base=/Library/WebServer/Documents/cache [Sewer] type=Mapnik mapfile=/Library/WebServer/Documents/mapfile.xml spherical_mercator=true tms_type=google bbox=-81.91197204589839, 41.3200492858887, -81.43186187744141, 41.5950317382812 extension=png [basic] type=WMS url=http://labs.metacarta.com/wms/vmap0 extension=png My mapfile.xml is too long to post here, but I have been successfully rendering a map with nik2img (which I really like): nik2img.py mapfile.xml mercator.png --srs 900913 --bbox -81.91197204589839 41.3200492858887 -81.43186187744141 41.5950317382812 -v -d 2400 1200 The error I get in my browser (Safari/Firefox) when trying to access: An error occurred: dlopen(/Library/Frameworks/Mapnik.framework/Versions/Current/Python/2.5/site-packages/mapnik/_mapnik.so, 2): no suitable image found. Did find: /Library/Frameworks/Mapnik.framework/Versions/Current/Python/2.5/site-packages/mapnik/_mapnik.so: mach-o, but wrong architecture File "/Library/Python/2.5/site-packages/TileCache-2.10-py2.5.egg/TileCache/Service.py", line 256, in modPythonHandler host ) File "/Library/Python/2.5/site-packages/TileCache-2.10-py2.5.egg/TileCache/Service.py", line 208, in dispatchRequest return self.renderTile(tile, params.has_key('FORCE')) File "/Library/Python/2.5/site-packages/TileCache-2.10-py2.5.egg/TileCache/Service.py", line 138, in renderTile data = layer.render(tile, force=force) File "/Library/Python/2.5/site-packages/TileCache-2.10-py2.5.egg/TileCache/Layer.py", line 443, in render return self.renderTile(tile) File "/Library/Python/2.5/site-packages/TileCache-2.10-py2.5.egg/TileCache/Layers/Mapnik.py", line 27, in renderTile import mapnik File "/Library/Frameworks/Mapnik.framework/Versions/Current/Python/2.5/site-packages/mapnik/__init__.py", line 23, in <module> from _mapnik import * Now, looking at my errors, one thing sticks out at me: *mach-o, but wrong architecture* So now I am more confused, is my overall strategy wrong (i.e. using Tilecache/Mod_python/Mac OS X)? If not, what may be the remedy? If my strategy is going in the wrong direction, what might be the best way to render custom data (not OSM) tiles using Mapnik, and Mac OS X? Thanks, for any help or direction. Joseph M Jira
_______________________________________________ Mapnik-users mailing list [email protected] https://lists.berlios.de/mailman/listinfo/mapnik-users

