1

I struggle to set up two different map styles for the mapnik-osm rendering tool chain. According to some help I already found on gis.stackexchange, I set up the renderd.conf for two map styles. But I can't get it to work. When I enter the URL for the second map style (http://myserverurl/print/0/0/0.png) the browser says "The requested URL was not found on this server." With the default map style it is no problem (http://myserverurl/osm/0/0/0.png).

I couldn't find any other setting in the mod_tile or renderd config files to enable the "print" map style to work. The renderd.conf looks like this:

[renderd]
stats_file=/var/run/renderd/renderd.stats
socketname=/var/run/renderd/renderd.sock
num_threads=10
tile_dir=/var/lib/mod_tile

[mapnik]
plugins_dir=/usr/lib/mapnik/3.0/input
font_dir=/usr/share/fonts/truetype/ttf-dejavu
font_dir_recurse=false

[default]
URI=/osm/
TILEDIR=/var/lib/mod_tile
TILESIZE=256
XML=/home/osm/openstreetmap-carto-4.24.1/style.xml
DESCRIPTION=Default map style
;ATTRIBUTION=&copy;<a href=\"http://www.openstreetmap.org/\">OpenStreetMap</a> and <a href=\"http://wiki.openstreetmap.org/w\
iki/Contributors\">contributors</a>, <a href=\"http://creativecommons.org/licenses/by-sa/2.0/\">CC-BY-SA</a>
;HOST=http://myserverurl
;SERVER_ALIAS=http://a.tile.openstreetmap.org
;SERVER_ALIAS=http://b.tile.openstreetmap.org
;HTCPHOST=proxy.openstreetmap.org

[print]
URI=/print/
TILEDIR=/var/lib/mod_tile
TILESIZE=512
XML=/home/osm/openstreetmap-carto-4.24.1/print/style.xml
DESCRIPTION=print map style
;ATTRIBUTION=&copy;<a href=\"http://www.openstreetmap.org/\">OpenStreetMap</a> and <a href=\"http://wiki.openstreetmap.org/w\
iki/Contributors\">contributors</a>, <a href=\"http://creativecommons.org/licenses/by-sa/2.0/\">CC-BY-SA</a>
;HOST=http://myserverurl
;SERVER_ALIAS=http://a.tile.openstreetmap.org
;SERVER_ALIAS=http://b.tile.openstreetmap.org
;HTCPHOST=proxy.openstreetmap.org

1 Answer 1

0

So the solution was: In the /var/www/ directory was only an osm folder (http://myserverurl/osm/0/0/0.png worked). I created another directory named like the additional mapstyle (print). And gave the permission chmod -R 755 /var/www.

After a restart of Apache it now serves the other map style through http://myserverurl/print/0/0/0.png.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.