From d409816eee19e3cefa9ccf744fefe190d5ee12d2 Mon Sep 17 00:00:00 2001 From: Petra Duriancikova <69296639+petraduriancikova@users.noreply.github.com> Date: Thu, 31 Jul 2025 12:41:47 +0200 Subject: [PATCH] Fixes in style (#1730) * Fix text-field expressions in POI - Removed text-field expressions from transport, place of worship and accommodation. - The language switcher wasn't able to parse them and they are not neccessary in the style. - Added `"text-optional": true` to Accommodation - if both icon and text can't fit, only icon will be displayed, which simulates a bit the previous behaviour. * Fix filter in City layer Fixed filter, Istanbul was missing. --- layers/place/style.json | 7 +++-- layers/poi/style.json | 64 ++++++++++++++++++++--------------------- 2 files changed, 35 insertions(+), 36 deletions(-) diff --git a/layers/place/style.json b/layers/place/style.json index 9d832b9a..45b8d693 100644 --- a/layers/place/style.json +++ b/layers/place/style.json @@ -384,9 +384,10 @@ "city" ], [ - "!=", - "rank", - 1 + "!in", + "capital", + 1, + 2 ] ], "order": 244 diff --git a/layers/poi/style.json b/layers/poi/style.json index 2f081489..1acf25f2 100644 --- a/layers/poi/style.json +++ b/layers/poi/style.json @@ -959,18 +959,17 @@ ] ], "text-anchor": "top", - "text-field": { - "stops": [ - [ - 15, - "" - ], - [ - 16, - "{name}" - ] + "text-field": [ + "coalesce", + [ + "get", + "name:en" + ], + [ + "get", + "name" ] - }, + ], "text-font": [ "Open Sans Semibold", "Noto Sans Bold" @@ -1298,18 +1297,17 @@ ] ], "text-anchor": "top", - "text-field": { - "stops": [ - [ - 17, - "" - ], - [ - 18, - "{name}" - ] + "text-field": [ + "coalesce", + [ + "get", + "name:en" + ], + [ + "get", + "name" ] - }, + ], "text-font": [ "Open Sans Semibold", "Noto Sans Bold" @@ -1319,6 +1317,7 @@ 0, 0.6 ], + "text-optional": true, "text-padding": 2, "text-size": { "stops": [ @@ -1374,18 +1373,17 @@ ], "text-allow-overlap": false, "text-anchor": "top", - "text-field": { - "stops": [ - [ - 15, - "" - ], - [ - 16, - "{name}" - ] + "text-field": [ + "coalesce", + [ + "get", + "name:en" + ], + [ + "get", + "name" ] - }, + ], "text-font": [ "Open Sans Semibold", "Noto Sans Bold"