Hi, I followed the instructions on switch2osm setting up my own osm tile server and managed to render a small area of the osm map data. Now next I want to add another layer of the same area into the server so that the client is able to have different views of the area just like on the main osm web where I can switch to Circle Map view or Transport Map view in addition to the standard view. I could not be able to find much information about how to do this? Any advice on this would be appreciated. Now my configuration is Ubuntu14.04 64bt + Apache + Mod_tile(renderd) + mapnik + osmbright + Postgresql(PostGIS). Thanks guys. asked 01 Sep '15, 11:01 dalishi aseerel4c26 ♦ |
This is easy. You need to add the additional layers to your renderd,conf and naturally you need the added style files, for example
answered 01 Sep '15, 18:33 SimonPoole ♦ 1
Hi SimonPoole, thanks for your reply. I am sorry if I did not describe my case clearly. My two layers are from different data sources, e.g. maplayer1.pbf and maplayer2.pbf, both of exactly the same area. How do I set maplayer2.pbf to the postgresql database and how then configure to link the layers in the renderd probably I guess? Thanks.
(02 Sep '15, 03:32)
dalishi
2
@dalishi the datasource specifications are in the style file. If for whatever reason the data is different for the two extracts you have, you simply need to import them in to seperate database instances and adapt the datasource specs. I've never actually done that myself, but I don't see any reason why that shouldn't work.
(02 Sep '15, 06:58)
SimonPoole ♦
One slight caveat to SimonPoole's original answer - it appears that the layers can't be called "[default]" (which they may be if someone's come via the switch2osm instructions). Maybe this has been fixed recently (I'm using fairly old versions). However, there's no need to change the URI for the resulting tiles - just the name of the section in /usr/local/etc/renderd.conf and the name of the directory below /usr/local/etc/renderd.conf change.
(05 Sep '15, 14:17)
SomeoneElse ♦
1
Hi @SomeoneElse thanks for the comments. I have tried and I can keep the [default] and add other sections below with their style xml respectively. For the URI I don't quite understand why you said no need to change. I assign each section with a URI, e.g URI=/osm_tiles/ for [dafault] and URI=/my_tiles/ for [myosm] which is my own section. I keep the TILEDIR=/var/lib/mod_tile the same though.
(08 Sep '15, 10:56)
dalishi
|