Skip to content
Open
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: 70 additions & 1 deletion historical/historical.json
Original file line number Diff line number Diff line change
Expand Up @@ -6162,6 +6162,56 @@
"text-opacity": ["interpolate", ["linear"], ["zoom"], 13.99, 0, 14, 1]
}
},
{
"id": "address_points_labels",
"type": "symbol",
"source": "ohm",
"source-layer": "address_points",
"minzoom": 16,
"filter": ["has", "addr_housenumber"],
"layout": {
"text-field": ["get", "addr_housenumber"],
"text-size": ["interpolate", ["linear"], ["zoom"], 16, 8, 17, 9, 20, 10],
"text-anchor": "top",
"text-offset": [0, 1],
"text-font": ["OpenHistorical"],
"visibility": "visible"
},
"paint": {
"text-color": "rgba(80, 80, 80, 1)",
"text-halo-color": "rgba(255, 255, 255, 1)",
"text-halo-width": 1,
"text-halo-blur": 0.5,
"text-opacity": ["interpolate", ["linear"], ["zoom"], 16.99, 0, 17, 1]
}
},
{
"id": "buildings_address_labels",
"type": "symbol",
"source": "ohm",
"source-layer": "buildings",
"minzoom": 16,
"filter": [
"all",
["has", "addr_housenumber"],
["any", ["!", ["has", "name"]], ["==", ["get", "name"], ""]]
],
"layout": {
"text-field": ["get", "addr_housenumber"],
"text-size": ["interpolate", ["linear"], ["zoom"], 16, 8, 17, 9, 20, 10],
"text-anchor": "top",
"text-offset": [0, 1],
"text-font": ["OpenHistorical"],
"visibility": "visible"
},
"paint": {
"text-color": "rgba(80, 80, 80, 1)",
"text-halo-color": "rgba(255, 255, 255, 1)",
"text-halo-width": 1,
"text-halo-blur": 0.5,
"text-opacity": ["interpolate", ["linear"], ["zoom"], 16.99, 0, 17, 1]
}
},
{
"id": "points_of_interest_buildings",
"type": "symbol",
Expand All @@ -6172,7 +6222,26 @@
"layout": {
"icon-image": "{tourism}-18",
"visibility": "visible",
"text-field": ["get", "name"],
"text-field": [
"step",
["zoom"],
["get", "name"],
17,
[
"case",
["all", ["has", "name"], ["has", "addr_housenumber"]],
[
"format",
["get", "name"],
{},
"\n",

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.

If the building has a house number but lacks a name, this newline shifts the house number down by a full line. The user would perceive a label at a different location, possibly on a different building.

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.

Yeah, I was kind of thinking the same. Would you suggest keeping the number the same size as the name? Because I also feel like the label gets very tall when it's a longer name and wraps on 2 lines and then also the address on a third line. And then your translation text in the future.

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.

Oh, I just realized what you actually commented. Yeah, I can fix that.

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.

Yeah, I was kind of thinking the same. Would you suggest keeping the number the same size as the name? Because I also feel like the label gets very tall when it's a longer name and wraps on 2 lines and then also the address on a third line.

I think the subtitle text in #73 (comment) is less confusing than OpenHistoricalMap/issues#1353 (comment), particularly because a four-digit number in parentheses could easily be mistaken for a year.

If the house number makes the label too tall, I suppose we could nix the house number when there’s already a name. OSM Carto does that under the assumption that a named building is already sufficiently identifiable. Alternatively, we could shrink the building labels to match the POI labels. If so, I’d shrink the house numbers further still or italicize them to keep them distinct from the building names.

And then your translation text in the future.

The translation replaces the main text. The gloss we’re considering in OpenHistoricalMap/issues#799 would get appended to labels in some layers, particularly places, but not necessarily for something like buildings, since it could get pretty repetitive.

{},
["get", "addr_housenumber"],
{"font-scale": 0.65}
],
["get", "name"]
]
],
"text-size": ["interpolate", ["linear"], ["zoom"], 16, 12, 17, 14, 20, 16],
"text-anchor": "center",
"text-offset": [0, 0],
Expand Down