Currently I'm trying to build a very basic map server running on a Raspberry Pi (Archlinux). I've installed Mapnik and can render a png image using this simple python script:
#!/usr/bin/env python
import mapnik
stylesheet = 'world_style.xml'
image = 'world_style.png'
m = mapnik.Map(2*1024, 2*1024)
mapnik.load_map(m, stylesheet)
m.zoom_all()
mapnik.render_to_file(m, image)
print "rendered image to '%s'" % image
Using this style XML:
<map background-color="#ffeaea" srs="+proj=latlong +datum=WGS84 +no_defs">
<Style name="My Style">
<Rule>
<PolygonSymbolizer fill="#eaeaff" />
<LineSymbolizer stroke="rgb(25%,25%,25%)" stroke-width="1.0" />
</Rule>
</Style>
<Layer name="world" srs="+proj=latlong +datum=WGS84 +no_defs">
<StyleName>My Style</StyleName>
<Datasource>
<Parameter name="type">shape</Parameter>
<Parameter name="file">/home/pi/world/MyEurope.shp</Parameter>
<Parameter name="extents">-180,-90,180,90</Parameter>
</Datasource>
</Layer>
</map>
I got the shapefile from http://my5cent.spdns.de/en/beaglebone-black-raspberry-pi/einfacher-karten-server-mit-mapserver-schape-files-und-openlayers.html (Look for the 2nd section where a link to Europe SHP is shown)
Unfortunately, all I get when trying to load the map, either using leaflet or openlayers is empty.
Renderd seems to be working, and this is a sample of the logs shown:
renderd[2756]: DEBUG: START TILE default 7 64-71 56-63, new metatile
renderd[2756]: Rendering projected coordinates 7 64 56 -> 0.000000|0.000000 2504688.542850|2504688.542850 to a 8 x 8 tile
renderd[2756]: DEBUG: DONE TILE default 6 32-39 24-31 in 19.404 seconds
debug: Creating and writing a metatile to /var/lib/mod_tile/default/6/0/0/0/33/8.meta
renderd[2756]: DEBUG: START TILE default 7 64-71 64-71, new metatile
renderd[2756]: Rendering projected coordinates 7 64 64 -> 0.000000|-2504688.542850 2504688.542850|0.000000 to a 8 x 8 tile
renderd[2756]: DEBUG: DONE TILE default 7 56-63 64-71 in 17.699 seconds
debug: Creating and writing a metatile to /var/lib/mod_tile/default/7/0/0/0/52/128.meta
renderd[2756]: DEBUG: Sending render cmd(3 default 7/63/64) with protocol version 2 to fd 7
renderd[2756]: DEBUG: Failed to read cmd on fd 7
renderd[2756]: DEBUG: Connection 0, fd 7 closed, now 5 left
renderd[2756]: DEBUG: Sending render cmd(3 default 7/62/64) with protocol version 2 to fd 11
renderd[2756]: DEBUG: Failed to read cmd on fd 11
renderd[2756]: DEBUG: Connection 4, fd 11 closed, now 4 left
renderd[2756]: DEBUG: Got incoming connection, fd 7, number 5
renderd[2756]: DEBUG: Got incoming connection, fd 11, number 6
renderd[2756]: DEBUG: Got incoming request with protocol version 2
renderd[2756]: DEBUG: Got command RenderPrio fd(7) xml(default), z(7), x(65), y(63), mime(image/png), options()
renderd[2756]: DEBUG: Got incoming request with protocol version 2
renderd[2756]: DEBUG: Got command RenderPrio fd(11) xml(default), z(7), x(65), y(64), mime(image/png), options()
renderd[2756]: DEBUG: DONE TILE default 7 56-63 56-63 in 17.540 seconds
debug: Creating and writing a metatile to /var/lib/mod_tile/default/7/0/0/0/51/136.meta
renderd[2756]: DEBUG: Sending render cmd(3 default 7/63/63) with protocol version 2 to fd 8
renderd[2756]: DEBUG: Failed to read cmd on fd 8
renderd[2756]: DEBUG: Connection 0, fd 8 closed, now 5 left
renderd[2756]: DEBUG: Sending render cmd(3 default 7/62/63) with protocol version 2 to fd 9
renderd[2756]: DEBUG: Failed to read cmd on fd 9
renderd[2756]: DEBUG: Connection 2, fd 9 closed, now 4 left
renderd[2756]: DEBUG: Got incoming connection, fd 8, number 5
renderd[2756]: DEBUG: Got incoming request with protocol version 2
renderd[2756]: DEBUG: Got command RenderPrio fd(8) xml(default), z(7), x(64), y(62), mime(image/png), options()
renderd[2756]: DEBUG: Got incoming connection, fd 9, number 6
renderd[2756]: DEBUG: Got incoming request with protocol version 2
renderd[2756]: DEBUG: Got command RenderPrio fd(9) xml(default), z(7), x(65), y(62), mime(image/png), options()
renderd[2756]: DEBUG: DONE TILE default 7 64-71 56-63 in 11.791 seconds
debug: Creating and writing a metatile to /var/lib/mod_tile/default/7/0/0/0/67/8.meta
I've tried a lot of guides out there but nothing seems to work. I've even tried changing the style xml file so that the data source used is postgres (previously importing the shp to a database and trying by rendering with the python script), with no success.
What am I doing wrong?