4

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?

  • If by "server" you mean "physical machine", then yes of course. The fall back is to run two copies of the tile server, on different ports. (There might be an even better way.) – Steve Bennett Dec 1 '13 at 10:14
7

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! – patrickruetter Jul 8 '14 at 13:53
0

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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