Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 71 additions & 0 deletions historical/historical.json
Original file line number Diff line number Diff line change
Expand Up @@ -6062,6 +6062,77 @@
"text-halo-width": 1
}
},
{
"id": "landuse_areas_labels_cemetery_christian",
"type": "symbol",
"source": "ohm",
"source-layer": "landuse_points_centroids",
"minzoom": 14,
"maxzoom": 24,
"filter": [
"all",
["==", ["get", "type"], "cemetery"],
["==", ["get", "religion"], "christian"],
[
"!",
[
"in",
["get", "denomination"],
["literal", ["jehovahs_witness", "mormon", "iglesia_ni_cristo"]]
]
]
],
"layout": {
"icon-image": "cross-18",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A simple cross could get confused with a church. Some churches are located on cemetery grounds.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I'll think up some new icon. Maybe a simple tombstone that's different than the gravestone

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of duplicating the layer and negating the filter, keep just one layer but replace this property value with an expression. Use match expressions to keep it more readable:

[
  "match",
  ["get", "religion"],
  "christian",
  [
    "match",
    ["get", "denomination"],
    ["jehovahs_witness", "mormon", "iglesia_ni_cristo"],
    "",
    "cross-18"
  ],
  ""
]

You can do something similar with text-offset, but you’ll need to stuff the array in a literal expression, so it doesn’t get misinterpreted as an expression.

"text-field": ["get", "name"],
"text-size": 11,
"text-anchor": "top",
"text-offset": [0, 0.75],
"text-font": ["OpenHistorical"]
},
"paint": {
"text-color": "rgba(95, 107, 71, 1)",
"text-halo-color": "rgba(245, 239, 239, 1)",
"text-halo-width": 1
}
},
{
"id": "landuse_areas_labels_cemetery",
"type": "symbol",
"source": "ohm",
"source-layer": "landuse_points_centroids",
"minzoom": 14,
"maxzoom": 24,
"filter": [
"all",
["==", ["get", "type"], "cemetery"],
[
"!",
[
"all",
["==", ["get", "religion"], "christian"],
[
"!",
[
"in",
["get", "denomination"],
["literal", ["jehovahs_witness", "mormon", "iglesia_ni_cristo"]]
]
]
]
]
],
"layout": {
"text-field": ["get", "name"],
"text-size": 11,
"text-font": ["OpenHistorical"]
},
"paint": {
"text-color": "rgba(95, 107, 71, 1)",
"text-halo-color": "rgba(245, 239, 239, 1)",
"text-halo-width": 1
}
},
{
"id": "landuse_areas_labels_school",
"type": "symbol",
Expand Down