I installed an OSM Mapnik tile server (according to the switch2osm documentation). Now, i'd like to serve tiles in different styles from the same server. Is this somehow possible?
2 Answers
Just edit the renderd.conf and add a section for your second style (make sure the "URI" entry points to a different path than that of your default style). For example, my renderd.conf contains the sections
[default]
XML=/etc/mapnik-osm-carto-data/osm.xml
URI=/osm/
DESCRIPTION=This is the standard osm mapnik style
HOST=host.my
CORS=*
MINZOOM=0
MAXZOOM=20
[bright]
XML=/etc/mapnik-osmbright/OSMBright.xml
URI=/bright/
DESCRIPTION=This is a modified osmBright style
HOST=host.my
CORS=*
MINZOOM=0
MAXZOOM=20
Thus, tiles with the mapnik default style will be served under the URI /osm/... , and tiles with the OSMBright style will be served under /bright/... .
Just don't forget to restart your webserver after changing the renderd.conf, as mod_tile needs to re-read the renderd.conf for the changes to take effect.
-
Thanks a lot for your answer. The project is currently on hold but I'm looking forward to try your solution! Commented Jul 8, 2014 at 13:53
I'm not an expert but AFAIK there is currently no ready to use way within the OSM render stack to switch between styles. So you need to setup manually, which I can just describe on a high level as I lack the knowledge in details:
- enable tirex/mod_tile to split into 2 rendering paths
- separate rendering queues
- split into 2 mapnik rendering configs