@@ -18,6 +18,8 @@ themepark:set_option('tags', 'all_tags')
1818themepark :set_option (' unique_id' , ' id' )
1919
2020-- ---------------------------------------------------------------------------
21+ -- Choose which names from which languages to use in the map.
22+ -- See 'themes/core/README.md' for details.
2123
2224-- themepark:add_topic('core/name-single', { column = 'name' })
2325-- themepark:add_topic('core/name-list', { keys = {'name', 'name:de', 'name:en'} })
@@ -30,6 +32,8 @@ themepark:add_topic('core/name-with-fallback', {
3032 }
3133})
3234
35+ -- --------------------------------------------------------------------------
36+
3337themepark :add_topic (' core/layer' )
3438
3539themepark :add_topic (' external/oceans' , { name = ' ocean' })
@@ -56,37 +60,44 @@ themepark:add_topic('shortbread_v1/addresses')
5660
5761-- ---------------------------------------------------------------------------
5862
63+ -- Create config files only in create mode, not when updating the database.
64+ -- This protects the file in case it contains manual edits.
5965if osm2pgsql .mode == ' create' then
60- themepark :plugin (' t-rex' ):write_config (' t-rex-config.toml' , {
61- tileset = ' osm' ,
62- extra_layers = {
63- {
64- buffer_size = 10 ,
65- name = ' street_labels' ,
66- geometry_type = ' LINESTRING' ,
67- query = {
68- {
69- minzoom = 14 ,
70- sql = [[
71- SELECT "name","name_de","name_en","kind","layer","ref","ref_rows","ref_cols","z_order","geom"
72- FROM "streets"
73- WHERE "geom" && !bbox! AND !zoom! >= "minzoom"
74- ORDER BY "z_order" asc]]
75- },
76- {
77- minzoom = 11 ,
78- maxzoom = 13 ,
79- sql = [[
80- SELECT "name","name_de","name_en","kind","layer","ref","ref_rows","ref_cols","z_order","geom"
81- FROM "streets_med"
82- WHERE "geom" && !bbox! AND !zoom! >= "minzoom"
83- ORDER BY "z_order" asc]]
84- },
85- }
86- }
87- }
88- })
66+ -- Enable if you want to create a config file for the T-Rex tile server
67+ --
68+ -- themepark:plugin('t-rex'):write_config('t-rex-config.toml', {
69+ -- tileset = 'osm',
70+ -- extra_layers = {
71+ -- {
72+ -- buffer_size = 10,
73+ -- name = 'street_labels',
74+ -- geometry_type = 'LINESTRING',
75+ -- query = {
76+ -- {
77+ -- minzoom = 14,
78+ -- sql = [[
79+ -- SELECT "name","name_de","name_en","kind","layer","ref","ref_rows","ref_cols","z_order","geom"
80+ -- FROM "streets"
81+ -- WHERE "geom" && !bbox! AND !zoom! >= "minzoom"
82+ -- ORDER BY "z_order" asc]]
83+ -- },
84+ -- {
85+ -- minzoom = 11,
86+ -- maxzoom = 13,
87+ -- sql = [[
88+ -- SELECT "name","name_de","name_en","kind","layer","ref","ref_rows","ref_cols","z_order","geom"
89+ -- FROM "streets_med"
90+ -- WHERE "geom" && !bbox! AND !zoom! >= "minzoom"
91+ -- ORDER BY "z_order" asc]]
92+ -- },
93+ -- }
94+ -- }
95+ -- }
96+ -- })
8997
98+ -- Enable if you want to create a config file for the Tilekiln tile server.
99+ -- (You must also create the directory 'tk'.)
100+ --
90101-- themepark:plugin('tilekiln'):write_config('tk')
91102end
92103
0 commit comments