Skip to content

Commit 9ebb7cd

Browse files
committed
shortbread: Use a more specific variable for if something is a poi
We need to deduplicate between the address and poi layers, so we store if something is a poi in an object's data. Using a more specific variable name makes it less likely to collide with other users.
1 parent e953971 commit 9ebb7cd

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

themes/shortbread_v1/topics/addresses.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ end
4141

4242
themepark:add_proc('node', function(object, data)
4343
-- Shortbread spec: Ignore addresses that are already in "pois" layer.
44-
if data.in_pois then
44+
if data.shortbread_in_pois then
4545
return
4646
end
4747

@@ -54,7 +54,7 @@ end)
5454

5555
themepark:add_proc('way', function(object, data)
5656
-- Shortbread spec: Ignore addresses that are already in "pois" layer.
57-
if data.in_pois or not object.is_closed then
57+
if data.shortbread_in_pois or not object.is_closed then
5858
return
5959
end
6060

@@ -67,7 +67,7 @@ end)
6767

6868
themepark:add_proc('relation', function(object, data)
6969
-- Shortbread spec: Ignore addresses that are already in "pois" layer.
70-
if data.in_pois then
70+
if data.shortbread_in_pois then
7171
return
7272
end
7373

themes/shortbread_v1/topics/pois.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ themepark:add_proc('node', function(object, data)
177177
if a then
178178
a.geom = object:as_point()
179179
themepark:insert('pois', a)
180-
data.in_pois = true
180+
data.shortbread_in_pois = true
181181
end
182182
end)
183183

@@ -186,7 +186,7 @@ themepark:add_proc('area', function(object, data)
186186
if a then
187187
a.geom = object:as_area():centroid()
188188
themepark:insert('pois', a)
189-
data.in_pois = true
189+
data.shortbread_in_pois = true
190190
end
191191
end)
192192

0 commit comments

Comments
 (0)