Skip to content

Commit 110646a

Browse files
committed
Disable all plugins in example config files
And better document those examples
1 parent ebc32ef commit 110646a

File tree

3 files changed

+66
-36
lines changed

3 files changed

+66
-36
lines changed

config/experimental.lua

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ themepark:set_option('tags', 'all_tags') -- Add JSONB column `tags` with origina
1919

2020
-- themepark:add_topic('core/clean-tags')
2121

22+
-- ---------------------------------------------------------------------------
23+
-- Choose which names from which languages to use in the map.
24+
-- See 'themes/core/README.md' for details.
25+
2226
-- themepark:add_topic('core/name-single', { column = 'name' })
2327
-- themepark:add_topic('core/name-list', { keys = {'name', 'name:de', 'name:en'} })
2428

@@ -30,16 +34,20 @@ themepark:add_topic('core/name-with-fallback', {
3034
}
3135
})
3236

33-
--themepark:add_topic('experimental/builtup')
34-
--themepark:add_topic('experimental/places')
35-
--themepark:add_topic('experimental/rivers')
37+
-- ---------------------------------------------------------------------------
38+
39+
-- themepark:add_topic('experimental/builtup')
40+
-- themepark:add_topic('experimental/places')
41+
-- themepark:add_topic('experimental/rivers')
3642

3743
themepark:add_topic('core/elevation')
3844
themepark:add_topic('experimental/information')
3945
themepark:add_topic('experimental/viewpoints')
4046

4147
-- ---------------------------------------------------------------------------
4248

43-
themepark:plugin('t-rex'):write_config('t-rex-config.toml', {})
49+
-- Enable if you want to create a config file for the T-Rex tile server.
50+
--
51+
-- themepark:plugin('t-rex'):write_config('t-rex-config.toml', {})
4452

4553
-- ---------------------------------------------------------------------------

config/shortbread.lua

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ themepark.debug = false
1414
themepark:set_option('tags', 'all_tags')
1515

1616
-- ---------------------------------------------------------------------------
17+
-- Choose which names from which languages to use in the map.
18+
-- See 'themes/core/README.md' for details.
1719

1820
-- themepark:add_topic('core/name-single', { column = 'name' })
1921
-- themepark:add_topic('core/name-list', { keys = {'name', 'name:de', 'name:en'} })
@@ -26,6 +28,8 @@ themepark:add_topic('core/name-with-fallback', {
2628
}
2729
})
2830

31+
-- --------------------------------------------------------------------------
32+
2933
themepark:add_topic('core/layer')
3034

3135
themepark:add_topic('external/oceans', { name = 'ocean' })
@@ -52,13 +56,20 @@ themepark:add_topic('shortbread_v1/addresses')
5256

5357
-- ---------------------------------------------------------------------------
5458

59+
-- Create config files only in create mode, not when updating the database.
60+
-- This protects the file in case it contains manual edits.
5561
if osm2pgsql.mode == 'create' then
56-
themepark:plugin('t-rex'):write_config('t-rex-config.toml', {
57-
tileset = 'osm',
58-
})
62+
-- Enable if you want to create a config file for the T-Rex tile server.
63+
--
64+
-- themepark:plugin('t-rex'):write_config('t-rex-config.toml', {})
5965

66+
-- Enable if you want to create a config file for the Tilekiln tile server.
67+
-- (You must also create the directory 'tk'.)
68+
--
6069
-- themepark:plugin('tilekiln'):write_config('tk')
6170

71+
-- Enable if you want to create a taginfo project file.
72+
--
6273
-- themepark:plugin('taginfo'):write_config('taginfo-shortbread', {
6374
-- project = { name = 'shortbread' }
6475
-- })

config/shortbread_gen.lua

Lines changed: 40 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ themepark:set_option('tags', 'all_tags')
1818
themepark: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+
3337
themepark:add_topic('core/layer')
3438

3539
themepark: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.
5965
if 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')
91102
end
92103

0 commit comments

Comments
 (0)