From e0ad08318d5834b9eaec2470c98faa2c4a23bd98 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 25 Feb 2026 14:00:51 +0000 Subject: feat: single light style, remove 3D buildings, language labels, stop disambiguation Co-authored-by: arielcostas <94913521+arielcostas@users.noreply.github.com> --- src/frontend/app/components/shared/AppMap.tsx | 9 ++- src/frontend/app/i18n/locales/en-GB.json | 3 +- src/frontend/app/i18n/locales/es-ES.json | 3 +- src/frontend/app/i18n/locales/gl-ES.json | 3 +- src/frontend/app/maps/styleloader.ts | 92 +++++++++++++++++++++++++-- src/frontend/app/routes/map.tsx | 87 ++++++++++++++++++++++++- 6 files changed, 182 insertions(+), 15 deletions(-) (limited to 'src/frontend') diff --git a/src/frontend/app/components/shared/AppMap.tsx b/src/frontend/app/components/shared/AppMap.tsx index 2c8d097..c6eb8ee 100644 --- a/src/frontend/app/components/shared/AppMap.tsx +++ b/src/frontend/app/components/shared/AppMap.tsx @@ -15,6 +15,7 @@ import Map, { type MapRef, type StyleSpecification, } from "react-map-gl/maplibre"; +import { useTranslation } from "react-i18next"; import { useLocation } from "react-router"; import { useApp } from "~/AppContext"; import { APP_CONSTANTS } from "~/config/constants"; @@ -82,6 +83,7 @@ export const AppMap = forwardRef( showCameras: settingsShowCameras, mapPositionMode, } = useApp(); + const { i18n } = useTranslation(); const mapRef = useRef(null); const [mapStyle, setMapStyle] = useState(DEFAULT_STYLE); const location = useLocation(); @@ -96,10 +98,13 @@ export const AppMap = forwardRef( useImperativeHandle(ref, () => mapRef.current!); useEffect(() => { - loadStyle("openfreemap", theme, { includeTraffic: showTraffic }) + loadStyle("openfreemap", theme, { + includeTraffic: showTraffic, + language: i18n.language, + }) .then((style) => setMapStyle(style)) .catch((error) => console.error("Failed to load map style:", error)); - }, [theme, showTraffic]); + }, [theme, showTraffic, i18n.language]); useEffect(() => { const handleMapChange = () => { diff --git a/src/frontend/app/i18n/locales/en-GB.json b/src/frontend/app/i18n/locales/en-GB.json index 6cb939d..3d8b32f 100644 --- a/src/frontend/app/i18n/locales/en-GB.json +++ b/src/frontend/app/i18n/locales/en-GB.json @@ -102,7 +102,8 @@ "map": { "popup_title": "Stop", "lines": "Lines", - "view_all_estimates": "View all estimates" + "view_all_estimates": "View all estimates", + "select_nearby_stop": "Select stop" }, "planner": { "where_to": "Where do you want to go?", diff --git a/src/frontend/app/i18n/locales/es-ES.json b/src/frontend/app/i18n/locales/es-ES.json index 5334fe1..2184cfc 100644 --- a/src/frontend/app/i18n/locales/es-ES.json +++ b/src/frontend/app/i18n/locales/es-ES.json @@ -102,7 +102,8 @@ "map": { "popup_title": "Parada", "lines": "Líneas", - "view_all_estimates": "Ver todas las estimaciones" + "view_all_estimates": "Ver todas las estimaciones", + "select_nearby_stop": "Seleccionar parada" }, "planner": { "where_to": "¿A donde quieres ir?", diff --git a/src/frontend/app/i18n/locales/gl-ES.json b/src/frontend/app/i18n/locales/gl-ES.json index 132ab0b..b951278 100644 --- a/src/frontend/app/i18n/locales/gl-ES.json +++ b/src/frontend/app/i18n/locales/gl-ES.json @@ -106,7 +106,8 @@ "map": { "popup_title": "Parada", "lines": "Liñas", - "view_all_estimates": "Ver todas as estimacións" + "view_all_estimates": "Ver todas as estimacións", + "select_nearby_stop": "Seleccionar parada" }, "planner": { "where_to": "Onde queres ir?", diff --git a/src/frontend/app/maps/styleloader.ts b/src/frontend/app/maps/styleloader.ts index 7d90116..62ab2fc 100644 --- a/src/frontend/app/maps/styleloader.ts +++ b/src/frontend/app/maps/styleloader.ts @@ -3,6 +3,7 @@ import type { Theme } from "~/AppContext"; export interface StyleLoaderOptions { includeTraffic?: boolean; + language?: string; } export const DEFAULT_STYLE: StyleSpecification = { @@ -13,19 +14,76 @@ export const DEFAULT_STYLE: StyleSpecification = { layers: [], }; +/** + * Builds a MapLibre text-field expression that prefers the given language. + */ +function buildLanguageTextField(language: string): unknown[] { + const lang = language.toLowerCase().split("-")[0]; + switch (lang) { + case "es": + return [ + "coalesce", + ["get", "name:es"], + ["get", "name:latin"], + ["get", "name"], + ]; + case "gl": + return [ + "coalesce", + ["get", "name:gl"], + ["get", "name:es"], + ["get", "name:latin"], + ["get", "name"], + ]; + case "en": + return [ + "coalesce", + ["get", "name:en"], + ["get", "name_en"], + ["get", "name:latin"], + ["get", "name"], + ]; + default: + return ["coalesce", ["get", "name:latin"], ["get", "name"]]; + } +} + +/** + * Returns true for text-field expressions that encode multi-language name + * logic (they reference name:latin or name_en). These are the label layers + * produced by OpenMapTiles / OpenFreeMap that need localisation. + */ +function isMultiLanguageTextField(textField: unknown): boolean { + if (!Array.isArray(textField)) return false; + const str = JSON.stringify(textField); + return str.includes('"name:latin"') || str.includes('"name_en"'); +} + +/** + * Mutates the loaded style to replace multi-language label expressions with + * a localised version appropriate for the given language code. + */ +function applyLanguageToStyle(style: any, language: string): void { + const newTextField = buildLanguageTextField(language); + for (const layer of style.layers ?? []) { + if ( + layer.layout?.["text-field"] && + isMultiLanguageTextField(layer.layout["text-field"]) + ) { + layer.layout["text-field"] = newTextField; + } + } +} + export async function loadStyle( styleName: string, colorScheme: Theme, options?: StyleLoaderOptions ): Promise { - const { includeTraffic = true } = options || {}; + const { includeTraffic = true, language } = options || {}; - if (colorScheme == "system") { - const isDarkMode = window.matchMedia( - "(prefers-color-scheme: dark)" - ).matches; - colorScheme = isDarkMode ? "dark" : "light"; - } + // Always use the light style as the single canonical base style. + colorScheme = "light"; if (styleName == "openfreemap") { const url = `/maps/styles/openfreemap-${colorScheme}.json`; @@ -45,6 +103,16 @@ export async function loadStyle( delete style.sources?.vigo_traffic; } + // Remove the pseudo-3D building-top layer (fill-translate shadow effect). + style.layers = (style.layers || []).filter( + (layer: any) => layer.id !== "building-top" + ); + + // Apply language-aware label expressions. + if (language) { + applyLanguageToStyle(style, language); + } + return style as StyleSpecification; } @@ -106,5 +174,15 @@ export async function loadStyle( } } + // Remove the pseudo-3D building-top layer. + style.layers = (style.layers || []).filter( + (layer: any) => layer.id !== "building-top" + ); + + // Apply language-aware label expressions. + if (language) { + applyLanguageToStyle(style, language); + } + return style as StyleSpecification; } diff --git a/src/frontend/app/routes/map.tsx b/src/frontend/app/routes/map.tsx index 2686222..af94509 100644 --- a/src/frontend/app/routes/map.tsx +++ b/src/frontend/app/routes/map.tsx @@ -1,4 +1,4 @@ -import { Check, X } from "lucide-react"; +import { Check, MapPin, X } from "lucide-react"; import type { FilterSpecification } from "maplibre-gl"; import { useMemo, useRef, useState } from "react"; import { useTranslation } from "react-i18next"; @@ -37,6 +37,9 @@ export default function StopMap() { StopSheetProps["stop"] | null >(null); const [isSheetOpen, setIsSheetOpen] = useState(false); + const [disambiguationStops, setDisambiguationStops] = useState< + Array + >([]); const mapRef = useRef(null); const { @@ -105,9 +108,42 @@ export default function StopMap() { ); return; } - const feature = features[0]; - handlePointClick(feature); + // Collect only stop-layer features with valid properties + const stopFeatures = features.filter( + (f) => f.layer?.id?.startsWith("stops") && f.properties?.id + ); + + if (stopFeatures.length === 0) return; + + if (stopFeatures.length === 1) { + // Single unambiguous stop – open the sheet directly + handlePointClick(stopFeatures[0]); + return; + } + + // Multiple overlapping stops – deduplicate by stop id and ask the user + const seen = new Set(); + const candidates: Array = []; + for (const f of stopFeatures) { + const id: string = f.properties!.id; + if (!seen.has(id)) { + seen.add(id); + candidates.push({ + stopId: id, + stopCode: f.properties!.code, + name: f.properties!.name || "Unknown Stop", + }); + } + } + + if (candidates.length === 1) { + // After deduplication only one stop remains + setSelectedStop(candidates[0]); + setIsSheetOpen(true); + } else { + setDisambiguationStops(candidates); + } }; const stopLayerFilter = useMemo(() => { @@ -350,6 +386,51 @@ export default function StopMap() { stop={selectedStop} /> )} + + {disambiguationStops.length > 1 && ( +
+
+
+

+ {t("map.select_nearby_stop", "Seleccionar parada")} +

+ +
+
    + {disambiguationStops.map((stop) => ( +
  • + +
  • + ))} +
+
+
+ )} ); -- cgit v1.3 From ae36a9e4a8a4dad3c14d8bb254d92778279c5c89 Mon Sep 17 00:00:00 2001 From: Ariel Costas Guerrero Date: Wed, 25 Feb 2026 16:13:24 +0100 Subject: Include back the building-top without 'shadows' --- src/frontend/app/maps/styleloader.ts | 5 - .../public/maps/styles/openfreemap-dark.json | 3374 -------------------- .../public/maps/styles/openfreemap-light.json | 27 +- 3 files changed, 1 insertion(+), 3405 deletions(-) delete mode 100644 src/frontend/public/maps/styles/openfreemap-dark.json (limited to 'src/frontend') diff --git a/src/frontend/app/maps/styleloader.ts b/src/frontend/app/maps/styleloader.ts index 62ab2fc..cbc216f 100644 --- a/src/frontend/app/maps/styleloader.ts +++ b/src/frontend/app/maps/styleloader.ts @@ -103,11 +103,6 @@ export async function loadStyle( delete style.sources?.vigo_traffic; } - // Remove the pseudo-3D building-top layer (fill-translate shadow effect). - style.layers = (style.layers || []).filter( - (layer: any) => layer.id !== "building-top" - ); - // Apply language-aware label expressions. if (language) { applyLanguageToStyle(style, language); diff --git a/src/frontend/public/maps/styles/openfreemap-dark.json b/src/frontend/public/maps/styles/openfreemap-dark.json deleted file mode 100644 index 568e62d..0000000 --- a/src/frontend/public/maps/styles/openfreemap-dark.json +++ /dev/null @@ -1,3374 +0,0 @@ -{ - "version": 8, - "sources": { - "openmaptiles": { - "type": "vector", - "url": "https://tiles.openfreemap.org/planet" - }, - "vigo_traffic": { - "type": "geojson", - "data": "/api/traffic" - } - }, - "sprite": "https://tiles.openfreemap.org/sprites/ofm_f384/ofm", - "glyphs": "https://tiles.openfreemap.org/fonts/{fontstack}/{range}.pbf", - "layers": [ - { - "id": "background", - "type": "background", - "paint": { - "background-color": "rgb(242,243,240)" - } - }, - { - "id": "park", - "type": "fill", - "source": "openmaptiles", - "source-layer": "park", - "filter": [ - "match", - [ - "geometry-type" - ], - [ - "MultiPolygon", - "Polygon" - ], - true, - false - ], - "paint": { - "fill-color": "rgb(230, 233, 229)" - } - }, - { - "id": "water", - "type": "fill", - "source": "openmaptiles", - "source-layer": "water", - "filter": [ - "all", - [ - "match", - [ - "geometry-type" - ], - [ - "MultiPolygon", - "Polygon" - ], - true, - false - ], - [ - "!=", - [ - "get", - "brunnel" - ], - "tunnel" - ] - ], - "paint": { - "fill-antialias": true, - "fill-color": "rgb(194, 200, 202)" - } - }, - { - "id": "landcover_ice_shelf", - "type": "fill", - "source": "openmaptiles", - "source-layer": "landcover", - "maxzoom": 8, - "filter": [ - "all", - [ - "match", - [ - "geometry-type" - ], - [ - "MultiPolygon", - "Polygon" - ], - true, - false - ], - [ - "==", - [ - "get", - "subclass" - ], - "ice_shelf" - ] - ], - "paint": { - "fill-color": "hsl(0,0%,98%)", - "fill-opacity": 0.7 - } - }, - { - "id": "landcover_glacier", - "type": "fill", - "source": "openmaptiles", - "source-layer": "landcover", - "maxzoom": 8, - "filter": [ - "all", - [ - "match", - [ - "geometry-type" - ], - [ - "MultiPolygon", - "Polygon" - ], - true, - false - ], - [ - "==", - [ - "get", - "subclass" - ], - "glacier" - ] - ], - "paint": { - "fill-color": "hsl(0,0%,98%)", - "fill-opacity": [ - "interpolate", - [ - "linear" - ], - [ - "zoom" - ], - 0, - 1, - 8, - 0.5 - ] - } - }, - { - "id": "landuse_residential", - "type": "fill", - "source": "openmaptiles", - "source-layer": "landuse", - "maxzoom": 16, - "filter": [ - "all", - [ - "match", - [ - "geometry-type" - ], - [ - "MultiPolygon", - "Polygon" - ], - true, - false - ], - [ - "==", - [ - "get", - "class" - ], - "residential" - ] - ], - "paint": { - "fill-color": "rgb(234, 234, 230)", - "fill-opacity": [ - "interpolate", - [ - "exponential", - 0.6 - ], - [ - "zoom" - ], - 8, - 0.8, - 9, - 0.6 - ] - } - }, - { - "id": "landcover_wood", - "type": "fill", - "source": "openmaptiles", - "source-layer": "landcover", - "minzoom": 10, - "filter": [ - "all", - [ - "match", - [ - "geometry-type" - ], - [ - "MultiPolygon", - "Polygon" - ], - true, - false - ], - [ - "==", - [ - "get", - "class" - ], - "wood" - ] - ], - "paint": { - "fill-color": "rgb(220,224,220)", - "fill-opacity": [ - "interpolate", - [ - "linear" - ], - [ - "zoom" - ], - 8, - 0, - 12, - 1 - ] - } - }, - { - "id": "waterway", - "type": "line", - "source": "openmaptiles", - "source-layer": "waterway", - "filter": [ - "match", - [ - "geometry-type" - ], - [ - "LineString", - "MultiLineString" - ], - true, - false - ], - "paint": { - "line-color": "hsl(195,17%,78%)" - } - }, - { - "id": "building", - "type": "fill", - "source": "openmaptiles", - "source-layer": "building", - "minzoom": 12, - "paint": { - "fill-antialias": true, - "fill-color": "rgb(234, 234, 229)", - "fill-outline-color": "rgb(219, 219, 218)" - } - }, - { - "id": "tunnel_motorway_casing", - "type": "line", - "source": "openmaptiles", - "source-layer": "transportation", - "minzoom": 6, - "filter": [ - "all", - [ - "match", - [ - "geometry-type" - ], - [ - "LineString", - "MultiLineString" - ], - true, - false - ], - [ - "all", - [ - "==", - [ - "get", - "brunnel" - ], - "tunnel" - ], - [ - "==", - [ - "get", - "class" - ], - "motorway" - ] - ] - ], - "layout": { - "line-cap": "butt", - "line-join": "miter" - }, - "paint": { - "line-color": "rgb(213, 213, 213)", - "line-opacity": 1, - "line-width": [ - "interpolate", - [ - "exponential", - 1.4 - ], - [ - "zoom" - ], - 5.8, - 0, - 6, - 3, - 20, - 40 - ] - } - }, - { - "id": "tunnel_motorway_inner", - "type": "line", - "source": "openmaptiles", - "source-layer": "transportation", - "minzoom": 6, - "filter": [ - "all", - [ - "match", - [ - "geometry-type" - ], - [ - "LineString", - "MultiLineString" - ], - true, - false - ], - [ - "all", - [ - "==", - [ - "get", - "brunnel" - ], - "tunnel" - ], - [ - "==", - [ - "get", - "class" - ], - "motorway" - ] - ] - ], - "layout": { - "line-cap": "round", - "line-join": "round" - }, - "paint": { - "line-color": "rgb(234,234,234)", - "line-width": [ - "interpolate", - [ - "exponential", - 1.4 - ], - [ - "zoom" - ], - 4, - 2, - 6, - 1.3, - 20, - 30 - ] - } - }, - { - "id": "aeroway-taxiway", - "type": "line", - "source": "openmaptiles", - "source-layer": "aeroway", - "minzoom": 12, - "filter": [ - "match", - [ - "get", - "class" - ], - [ - "taxiway" - ], - true, - false - ], - "layout": { - "line-cap": "round", - "line-join": "round" - }, - "paint": { - "line-color": "hsl(0,0%,88%)", - "line-opacity": 1, - "line-width": [ - "interpolate", - [ - "exponential", - 1.55 - ], - [ - "zoom" - ], - 13, - 1.8, - 20, - 20 - ] - } - }, - { - "id": "aeroway-runway-casing", - "type": "line", - "source": "openmaptiles", - "source-layer": "aeroway", - "minzoom": 11, - "filter": [ - "match", - [ - "get", - "class" - ], - [ - "runway" - ], - true, - false - ], - "layout": { - "line-cap": "round", - "line-join": "round" - }, - "paint": { - "line-color": "hsl(0,0%,88%)", - "line-opacity": 1, - "line-width": [ - "interpolate", - [ - "exponential", - 1.5 - ], - [ - "zoom" - ], - 11, - 6, - 17, - 55 - ] - } - }, - { - "id": "aeroway-area", - "type": "fill", - "source": "openmaptiles", - "source-layer": "aeroway", - "minzoom": 4, - "filter": [ - "all", - [ - "match", - [ - "geometry-type" - ], - [ - "MultiPolygon", - "Polygon" - ], - true, - false - ], - [ - "match", - [ - "get", - "class" - ], - [ - "runway", - "taxiway" - ], - true, - false - ] - ], - "paint": { - "fill-color": "rgba(255, 255, 255, 1)", - "fill-opacity": [ - "interpolate", - [ - "linear" - ], - [ - "zoom" - ], - 13, - 0, - 14, - 1 - ] - } - }, - { - "id": "aeroway-runway", - "type": "line", - "source": "openmaptiles", - "source-layer": "aeroway", - "minzoom": 11, - "filter": [ - "all", - [ - "match", - [ - "get", - "class" - ], - [ - "runway" - ], - true, - false - ], - [ - "match", - [ - "geometry-type" - ], - [ - "LineString", - "MultiLineString" - ], - true, - false - ] - ], - "layout": { - "line-cap": "round", - "line-join": "round" - }, - "paint": { - "line-color": "rgba(255, 255, 255, 1)", - "line-opacity": 1, - "line-width": [ - "interpolate", - [ - "exponential", - 1.5 - ], - [ - "zoom" - ], - 11, - 4, - 17, - 50 - ] - } - }, - { - "id": "road_area_pier", - "type": "fill", - "source": "openmaptiles", - "source-layer": "transportation", - "filter": [ - "all", - [ - "match", - [ - "geometry-type" - ], - [ - "MultiPolygon", - "Polygon" - ], - true, - false - ], - [ - "==", - [ - "get", - "class" - ], - "pier" - ] - ], - "paint": { - "fill-antialias": true, - "fill-color": "rgb(242,243,240)" - } - }, - { - "id": "road_pier", - "type": "line", - "source": "openmaptiles", - "source-layer": "transportation", - "filter": [ - "all", - [ - "match", - [ - "geometry-type" - ], - [ - "LineString", - "MultiLineString" - ], - true, - false - ], - [ - "match", - [ - "get", - "class" - ], - [ - "pier" - ], - true, - false - ] - ], - "layout": { - "line-cap": "round", - "line-join": "round" - }, - "paint": { - "line-color": "rgb(242,243,240)", - "line-width": [ - "interpolate", - [ - "exponential", - 1.2 - ], - [ - "zoom" - ], - 15, - 1, - 17, - 4 - ] - } - }, - { - "id": "highway_path", - "type": "line", - "source": "openmaptiles", - "source-layer": "transportation", - "filter": [ - "all", - [ - "match", - [ - "geometry-type" - ], - [ - "LineString", - "MultiLineString" - ], - true, - false - ], - [ - "==", - [ - "get", - "class" - ], - "path" - ] - ], - "layout": { - "line-cap": "round", - "line-join": "round" - }, - "paint": { - "line-color": "rgb(234, 234, 234)", - "line-opacity": 0.9, - "line-width": [ - "interpolate", - [ - "exponential", - 1.2 - ], - [ - "zoom" - ], - 13, - 1, - 20, - 10 - ] - } - }, - { - "id": "highway_minor", - "type": "line", - "source": "openmaptiles", - "source-layer": "transportation", - "minzoom": 8, - "filter": [ - "all", - [ - "match", - [ - "geometry-type" - ], - [ - "LineString", - "MultiLineString" - ], - true, - false - ], - [ - "match", - [ - "get", - "class" - ], - [ - "minor", - "service", - "track" - ], - true, - false - ] - ], - "layout": { - "line-cap": "round", - "line-join": "round" - }, - "paint": { - "line-color": "hsl(0,0%,88%)", - "line-opacity": 0.9, - "line-width": [ - "interpolate", - [ - "exponential", - 1.55 - ], - [ - "zoom" - ], - 13, - 1.8, - 20, - 20 - ] - } - }, - { - "id": "highway_major_casing", - "type": "line", - "source": "openmaptiles", - "source-layer": "transportation", - "minzoom": 11, - "filter": [ - "all", - [ - "match", - [ - "geometry-type" - ], - [ - "LineString", - "MultiLineString" - ], - true, - false - ], - [ - "match", - [ - "get", - "class" - ], - [ - "primary", - "secondary", - "tertiary", - "trunk" - ], - true, - false - ] - ], - "layout": { - "line-cap": "butt", - "line-join": "miter" - }, - "paint": { - "line-color": "rgb(213, 213, 213)", - "line-dasharray": [ - 12, - 0 - ], - "line-width": [ - "interpolate", - [ - "exponential", - 1.3 - ], - [ - "zoom" - ], - 10, - 3, - 20, - 23 - ] - } - }, - { - "id": "highway_major_inner", - "type": "line", - "source": "openmaptiles", - "source-layer": "transportation", - "minzoom": 11, - "filter": [ - "all", - [ - "match", - [ - "geometry-type" - ], - [ - "LineString", - "MultiLineString" - ], - true, - false - ], - [ - "match", - [ - "get", - "class" - ], - [ - "primary", - "secondary", - "tertiary", - "trunk" - ], - true, - false - ] - ], - "layout": { - "line-cap": "round", - "line-join": "round" - }, - "paint": { - "line-color": "#fff", - "line-width": [ - "interpolate", - [ - "exponential", - 1.3 - ], - [ - "zoom" - ], - 10, - 2, - 20, - 20 - ] - } - }, - { - "id": "highway_major_subtle", - "type": "line", - "source": "openmaptiles", - "source-layer": "transportation", - "maxzoom": 11, - "filter": [ - "all", - [ - "match", - [ - "geometry-type" - ], - [ - "LineString", - "MultiLineString" - ], - true, - false - ], - [ - "match", - [ - "get", - "class" - ], - [ - "primary", - "secondary", - "tertiary", - "trunk" - ], - true, - false - ] - ], - "layout": { - "line-cap": "round", - "line-join": "round" - }, - "paint": { - "line-color": "hsla(0,0%,85%,0.69)", - "line-width": 2 - } - }, - { - "id": "highway_motorway_casing", - "type": "line", - "source": "openmaptiles", - "source-layer": "transportation", - "minzoom": 6, - "filter": [ - "all", - [ - "match", - [ - "geometry-type" - ], - [ - "LineString", - "MultiLineString" - ], - true, - false - ], - [ - "all", - [ - "match", - [ - "get", - "brunnel" - ], - [ - "bridge", - "tunnel" - ], - false, - true - ], - [ - "==", - [ - "get", - "class" - ], - "motorway" - ] - ] - ], - "layout": { - "line-cap": "butt", - "line-join": "miter" - }, - "paint": { - "line-color": "rgb(213, 213, 213)", - "line-dasharray": [ - 2, - 0 - ], - "line-opacity": 1, - "line-width": [ - "interpolate", - [ - "exponential", - 1.4 - ], - [ - "zoom" - ], - 5.8, - 0, - 6, - 3, - 20, - 40 - ] - } - }, - { - "id": "highway_motorway_inner", - "type": "line", - "source": "openmaptiles", - "source-layer": "transportation", - "minzoom": 6, - "filter": [ - "all", - [ - "match", - [ - "geometry-type" - ], - [ - "LineString", - "MultiLineString" - ], - true, - false - ], - [ - "all", - [ - "match", - [ - "get", - "brunnel" - ], - [ - "bridge", - "tunnel" - ], - false, - true - ], - [ - "==", - [ - "get", - "class" - ], - "motorway" - ] - ] - ], - "layout": { - "line-cap": "round", - "line-join": "round" - }, - "paint": { - "line-color": [ - "interpolate", - [ - "linear" - ], - [ - "zoom" - ], - 5.8, - "hsla(0,0%,85%,0.53)", - 6, - "#fff" - ], - "line-width": [ - "interpolate", - [ - "exponential", - 1.4 - ], - [ - "zoom" - ], - 4, - 2, - 6, - 1.3, - 20, - 30 - ] - } - }, - { - "id": "highway_motorway_subtle", - "type": "line", - "source": "openmaptiles", - "source-layer": "transportation", - "maxzoom": 6, - "filter": [ - "all", - [ - "match", - [ - "geometry-type" - ], - [ - "LineString", - "MultiLineString" - ], - true, - false - ], - [ - "==", - [ - "get", - "class" - ], - "motorway" - ] - ], - "layout": { - "line-cap": "round", - "line-join": "round" - }, - "paint": { - "line-color": "hsla(0,0%,85%,0.53)", - "line-width": [ - "interpolate", - [ - "exponential", - 1.4 - ], - [ - "zoom" - ], - 4, - 2, - 6, - 1.3 - ] - } - }, - { - "id": "railway_transit", - "type": "line", - "source": "openmaptiles", - "source-layer": "transportation", - "minzoom": 16, - "filter": [ - "all", - [ - "match", - [ - "geometry-type" - ], - [ - "LineString", - "MultiLineString" - ], - true, - false - ], - [ - "all", - [ - "==", - [ - "get", - "class" - ], - "transit" - ], - [ - "match", - [ - "get", - "brunnel" - ], - [ - "tunnel" - ], - false, - true - ] - ] - ], - "layout": { - "line-join": "round" - }, - "paint": { - "line-color": "#dddddd", - "line-width": 3 - } - }, - { - "id": "railway_transit_dashline", - "type": "line", - "source": "openmaptiles", - "source-layer": "transportation", - "minzoom": 16, - "filter": [ - "all", - [ - "match", - [ - "geometry-type" - ], - [ - "LineString", - "MultiLineString" - ], - true, - false - ], - [ - "all", - [ - "==", - [ - "get", - "class" - ], - "transit" - ], - [ - "match", - [ - "get", - "brunnel" - ], - [ - "tunnel" - ], - false, - true - ] - ] - ], - "layout": { - "line-join": "round" - }, - "paint": { - "line-color": "#fafafa", - "line-dasharray": [ - 3, - 3 - ], - "line-width": 2 - } - }, - { - "id": "railway_service", - "type": "line", - "source": "openmaptiles", - "source-layer": "transportation", - "minzoom": 16, - "filter": [ - "all", - [ - "match", - [ - "geometry-type" - ], - [ - "LineString", - "MultiLineString" - ], - true, - false - ], - [ - "all", - [ - "==", - [ - "get", - "class" - ], - "rail" - ], - [ - "has", - "service" - ] - ] - ], - "layout": { - "line-join": "round" - }, - "paint": { - "line-color": "#dddddd", - "line-width": 3 - } - }, - { - "id": "railway_service_dashline", - "type": "line", - "source": "openmaptiles", - "source-layer": "transportation", - "minzoom": 16, - "filter": [ - "all", - [ - "match", - [ - "geometry-type" - ], - [ - "LineString", - "MultiLineString" - ], - true, - false - ], - [ - "==", - [ - "get", - "class" - ], - "rail" - ], - [ - "has", - "service" - ] - ], - "layout": { - "line-join": "round" - }, - "paint": { - "line-color": "#fafafa", - "line-dasharray": [ - 3, - 3 - ], - "line-width": 2 - } - }, - { - "id": "railway", - "type": "line", - "source": "openmaptiles", - "source-layer": "transportation", - "minzoom": 13, - "filter": [ - "all", - [ - "match", - [ - "geometry-type" - ], - [ - "LineString", - "MultiLineString" - ], - true, - false - ], - [ - "all", - [ - "!", - [ - "has", - "service" - ] - ], - [ - "==", - [ - "get", - "class" - ], - "rail" - ] - ] - ], - "layout": { - "line-join": "round" - }, - "paint": { - "line-color": "#dddddd", - "line-width": [ - "interpolate", - [ - "exponential", - 1.3 - ], - [ - "zoom" - ], - 16, - 3, - 20, - 7 - ] - } - }, - { - "id": "railway_dashline", - "type": "line", - "source": "openmaptiles", - "source-layer": "transportation", - "minzoom": 13, - "filter": [ - "all", - [ - "match", - [ - "geometry-type" - ], - [ - "LineString", - "MultiLineString" - ], - true, - false - ], - [ - "all", - [ - "!", - [ - "has", - "service" - ] - ], - [ - "==", - [ - "get", - "class" - ], - "rail" - ] - ] - ], - "layout": { - "line-join": "round" - }, - "paint": { - "line-color": "#fafafa", - "line-dasharray": [ - 3, - 3 - ], - "line-width": [ - "interpolate", - [ - "exponential", - 1.3 - ], - [ - "zoom" - ], - 16, - 2, - 20, - 6 - ] - } - }, - { - "id": "highway_motorway_bridge_casing", - "type": "line", - "source": "openmaptiles", - "source-layer": "transportation", - "minzoom": 6, - "filter": [ - "all", - [ - "match", - [ - "geometry-type" - ], - [ - "LineString", - "MultiLineString" - ], - true, - false - ], - [ - "all", - [ - "==", - [ - "get", - "brunnel" - ], - "bridge" - ], - [ - "==", - [ - "get", - "class" - ], - "motorway" - ] - ] - ], - "layout": { - "line-cap": "butt", - "line-join": "miter" - }, - "paint": { - "line-color": "rgb(213, 213, 213)", - "line-dasharray": [ - 2, - 0 - ], - "line-opacity": 1, - "line-width": [ - "interpolate", - [ - "exponential", - 1.4 - ], - [ - "zoom" - ], - 5.8, - 0, - 6, - 5, - 20, - 45 - ] - } - }, - { - "id": "highway_motorway_bridge_inner", - "type": "line", - "source": "openmaptiles", - "source-layer": "transportation", - "minzoom": 6, - "filter": [ - "all", - [ - "match", - [ - "geometry-type" - ], - [ - "LineString", - "MultiLineString" - ], - true, - false - ], - [ - "all", - [ - "==", - [ - "get", - "brunnel" - ], - "bridge" - ], - [ - "==", - [ - "get", - "class" - ], - "motorway" - ] - ] - ], - "layout": { - "line-cap": "round", - "line-join": "round" - }, - "paint": { - "line-color": [ - "interpolate", - [ - "linear" - ], - [ - "zoom" - ], - 5.8, - "hsla(0,0%,85%,0.53)", - 6, - "#fff" - ], - "line-width": [ - "interpolate", - [ - "exponential", - 1.4 - ], - [ - "zoom" - ], - 4, - 2, - 6, - 1.3, - 20, - 30 - ] - } - }, - { - "id": "boundary_3", - "type": "line", - "source": "openmaptiles", - "source-layer": "boundary", - "minzoom": 8, - "filter": [ - "all", - [ - ">=", - [ - "get", - "admin_level" - ], - 3 - ], - [ - "<=", - [ - "get", - "admin_level" - ], - 6 - ], - [ - "!=", - [ - "get", - "maritime" - ], - 1 - ], - [ - "!=", - [ - "get", - "disputed" - ], - 1 - ], - [ - "!", - [ - "has", - "claimed_by" - ] - ] - ], - "paint": { - "line-color": "hsl(0,0%,70%)", - "line-dasharray": [ - 1, - 1 - ], - "line-width": [ - "interpolate", - [ - "linear", - 1 - ], - [ - "zoom" - ], - 7, - 1, - 11, - 2 - ] - } - }, - { - "id": "boundary_2", - "type": "line", - "source": "openmaptiles", - "source-layer": "boundary", - "filter": [ - "all", - [ - "==", - [ - "get", - "admin_level" - ], - 2 - ], - [ - "!=", - [ - "get", - "maritime" - ], - 1 - ], - [ - "!=", - [ - "get", - "disputed" - ], - 1 - ], - [ - "!", - [ - "has", - "claimed_by" - ] - ] - ], - "layout": { - "line-cap": "round", - "line-join": "round" - }, - "paint": { - "line-color": "hsl(0,0%,70%)", - "line-opacity": [ - "interpolate", - [ - "linear" - ], - [ - "zoom" - ], - 0, - 0.4, - 4, - 1 - ], - "line-width": [ - "interpolate", - [ - "linear" - ], - [ - "zoom" - ], - 3, - 1, - 5, - 1.2, - 12, - 3 - ] - } - }, - { - "id": "boundary_disputed", - "type": "line", - "source": "openmaptiles", - "source-layer": "boundary", - "filter": [ - "all", - [ - "!=", - [ - "get", - "maritime" - ], - 1 - ], - [ - "==", - [ - "get", - "disputed" - ], - 1 - ] - ], - "paint": { - "line-color": "hsl(0,0%,70%)", - "line-dasharray": [ - 1, - 2 - ], - "line-width": [ - "interpolate", - [ - "linear" - ], - [ - "zoom" - ], - 3, - 1, - 5, - 1.2, - 12, - 3 - ] - } - }, - { - "id": "waterway_line_label", - "type": "symbol", - "source": "openmaptiles", - "source-layer": "waterway", - "minzoom": 10, - "filter": [ - "match", - [ - "geometry-type" - ], - [ - "LineString", - "MultiLineString" - ], - true, - false - ], - "layout": { - "symbol-placement": "line", - "symbol-spacing": 350, - "text-field": [ - "case", - [ - "has", - "name:nonlatin" - ], - [ - "concat", - [ - "get", - "name:latin" - ], - " ", - [ - "get", - "name:nonlatin" - ] - ], - [ - "coalesce", - [ - "get", - "name_en" - ], - [ - "get", - "name" - ] - ] - ], - "text-font": [ - "Noto Sans Italic" - ], - "text-letter-spacing": 0.2, - "text-max-width": 5, - "text-size": 14 - }, - "paint": { - "text-color": "hsl(0,0%,66%)", - "text-halo-color": "rgba(255,255,255,0.7)", - "text-halo-width": 1.5 - } - }, - { - "id": "water_name_point_label", - "type": "symbol", - "source": "openmaptiles", - "source-layer": "water_name", - "filter": [ - "match", - [ - "geometry-type" - ], - [ - "MultiPoint", - "Point" - ], - true, - false - ], - "layout": { - "text-field": [ - "case", - [ - "has", - "name:nonlatin" - ], - [ - "concat", - [ - "get", - "name:latin" - ], - "\n", - [ - "get", - "name:nonlatin" - ] - ], - [ - "coalesce", - [ - "get", - "name_en" - ], - [ - "get", - "name" - ] - ] - ], - "text-font": [ - "Noto Sans Italic" - ], - "text-letter-spacing": 0.2, - "text-max-width": 5, - "text-size": [ - "interpolate", - [ - "linear" - ], - [ - "zoom" - ], - 0, - 10, - 8, - 14 - ] - }, - "paint": { - "text-color": "#495e91", - "text-halo-color": "rgba(255,255,255,0.7)", - "text-halo-width": 1.5 - } - }, - { - "id": "water_name_line_label", - "type": "symbol", - "source": "openmaptiles", - "source-layer": "water_name", - "filter": [ - "match", - [ - "geometry-type" - ], - [ - "LineString", - "MultiLineString" - ], - true, - false - ], - "layout": { - "symbol-placement": "line", - "symbol-spacing": 350, - "text-field": [ - "case", - [ - "has", - "name:nonlatin" - ], - [ - "concat", - [ - "get", - "name:latin" - ], - " ", - [ - "get", - "name:nonlatin" - ] - ], - [ - "coalesce", - [ - "get", - "name_en" - ], - [ - "get", - "name" - ] - ] - ], - "text-font": [ - "Noto Sans Italic" - ], - "text-letter-spacing": 0.2, - "text-max-width": 5, - "text-size": 14 - }, - "paint": { - "text-color": "#495e91", - "text-halo-color": "rgba(255,255,255,0.7)", - "text-halo-width": 1.5 - } - }, - { - "id": "highway-name-path", - "type": "symbol", - "source": "openmaptiles", - "source-layer": "transportation_name", - "minzoom": 15.5, - "filter": [ - "==", - [ - "get", - "class" - ], - "path" - ], - "layout": { - "symbol-placement": "line", - "text-field": [ - "case", - [ - "has", - "name:nonlatin" - ], - [ - "concat", - [ - "get", - "name:latin" - ], - " ", - [ - "get", - "name:nonlatin" - ] - ], - [ - "coalesce", - [ - "get", - "name_en" - ], - [ - "get", - "name" - ] - ] - ], - "text-font": [ - "Noto Sans Regular" - ], - "text-rotation-alignment": "map", - "text-size": [ - "interpolate", - [ - "linear" - ], - [ - "zoom" - ], - 13, - 12, - 14, - 13 - ] - }, - "paint": { - "text-color": "hsl(30,0%,62%)", - "text-halo-color": "#f8f4f0", - "text-halo-width": 0.5 - } - }, - { - "id": "highway-name-minor", - "type": "symbol", - "source": "openmaptiles", - "source-layer": "transportation_name", - "minzoom": 15, - "filter": [ - "all", - [ - "match", - [ - "geometry-type" - ], - [ - "LineString", - "MultiLineString" - ], - true, - false - ], - [ - "match", - [ - "get", - "class" - ], - [ - "minor", - "service", - "track" - ], - true, - false - ] - ], - "layout": { - "symbol-placement": "line", - "text-field": [ - "case", - [ - "has", - "name:nonlatin" - ], - [ - "concat", - [ - "get", - "name:latin" - ], - " ", - [ - "get", - "name:nonlatin" - ] - ], - [ - "coalesce", - [ - "get", - "name_en" - ], - [ - "get", - "name" - ] - ] - ], - "text-font": [ - "Noto Sans Regular" - ], - "text-rotation-alignment": "map", - "text-size": [ - "interpolate", - [ - "linear" - ], - [ - "zoom" - ], - 13, - 12, - 14, - 13 - ] - }, - "paint": { - "text-color": "#666", - "text-halo-blur": 0.5, - "text-halo-width": 1 - } - }, - { - "id": "highway-name-major", - "type": "symbol", - "source": "openmaptiles", - "source-layer": "transportation_name", - "minzoom": 12.2, - "filter": [ - "match", - [ - "get", - "class" - ], - [ - "primary", - "secondary", - "tertiary", - "trunk" - ], - true, - false - ], - "layout": { - "symbol-placement": "line", - "text-field": [ - "case", - [ - "has", - "name:nonlatin" - ], - [ - "concat", - [ - "get", - "name:latin" - ], - " ", - [ - "get", - "name:nonlatin" - ] - ], - [ - "coalesce", - [ - "get", - "name_en" - ], - [ - "get", - "name" - ] - ] - ], - "text-font": [ - "Noto Sans Regular" - ], - "text-rotation-alignment": "map", - "text-size": [ - "interpolate", - [ - "linear" - ], - [ - "zoom" - ], - 13, - 12, - 14, - 13 - ] - }, - "paint": { - "text-color": "#666", - "text-halo-blur": 0.5, - "text-halo-width": 1 - } - }, - { - "id": "highway-shield-non-us", - "type": "symbol", - "source": "openmaptiles", - "source-layer": "transportation_name", - "minzoom": 11, - "filter": [ - "all", - [ - "match", - [ - "geometry-type" - ], - [ - "LineString", - "MultiLineString" - ], - true, - false - ], - [ - "match", - [ - "get", - "network" - ], - [ - "us-highway", - "us-interstate", - "us-state" - ], - false, - true - ] - ], - "layout": { - "icon-image": [ - "concat", - "road_", - [ - "get", - "ref_length" - ] - ], - "icon-rotation-alignment": "viewport", - "icon-size": 1, - "symbol-placement": [ - "step", - [ - "zoom" - ], - "point", - 11, - "line" - ], - "symbol-spacing": 200, - "text-field": [ - "to-string", - [ - "get", - "ref" - ] - ], - "text-font": [ - "Noto Sans Regular" - ], - "text-rotation-alignment": "viewport", - "text-size": 10 - } - }, - { - "id": "highway-shield-us-interstate", - "type": "symbol", - "source": "openmaptiles", - "source-layer": "transportation_name", - "minzoom": 11, - "filter": [ - "all", - [ - "match", - [ - "geometry-type" - ], - [ - "LineString", - "MultiLineString" - ], - true, - false - ], - [ - "match", - [ - "get", - "network" - ], - [ - "us-interstate" - ], - true, - false - ] - ], - "layout": { - "icon-image": [ - "concat", - [ - "get", - "network" - ], - "_", - [ - "get", - "ref_length" - ] - ], - "icon-rotation-alignment": "viewport", - "icon-size": 1, - "symbol-placement": [ - "step", - [ - "zoom" - ], - "point", - 7, - "line", - 8, - "line" - ], - "symbol-spacing": 200, - "text-field": [ - "to-string", - [ - "get", - "ref" - ] - ], - "text-font": [ - "Noto Sans Regular" - ], - "text-rotation-alignment": "viewport", - "text-size": 10 - } - }, - { - "id": "road_shield_us", - "type": "symbol", - "source": "openmaptiles", - "source-layer": "transportation_name", - "minzoom": 12, - "filter": [ - "all", - [ - "match", - [ - "geometry-type" - ], - [ - "LineString", - "MultiLineString" - ], - true, - false - ], - [ - "match", - [ - "get", - "network" - ], - [ - "us-highway", - "us-state" - ], - true, - false - ] - ], - "layout": { - "icon-image": [ - "concat", - [ - "get", - "network" - ], - "_", - [ - "get", - "ref_length" - ] - ], - "icon-rotation-alignment": "viewport", - "icon-size": 1, - "symbol-placement": [ - "step", - [ - "zoom" - ], - "point", - 11, - "line" - ], - "symbol-spacing": 200, - "text-field": [ - "to-string", - [ - "get", - "ref" - ] - ], - "text-font": [ - "Noto Sans Regular" - ], - "text-rotation-alignment": "viewport", - "text-size": 10 - } - }, - { - "id": "airport", - "type": "symbol", - "source": "openmaptiles", - "source-layer": "aerodrome_label", - "minzoom": 11, - "filter": [ - "all", - [ - "has", - "iata" - ] - ], - "layout": { - "icon-image": "airport_11", - "icon-size": 1, - "text-anchor": "top", - "text-field": [ - "case", - [ - "has", - "name:nonlatin" - ], - [ - "concat", - [ - "get", - "name:latin" - ], - "\n", - [ - "get", - "name:nonlatin" - ] - ], - [ - "coalesce", - [ - "get", - "name_en" - ], - [ - "get", - "name" - ] - ] - ], - "text-font": [ - "Noto Sans Regular" - ], - "text-max-width": 9, - "text-offset": [ - 0, - 0.6 - ], - "text-optional": true, - "text-padding": 2, - "text-size": 12 - }, - "paint": { - "text-color": "#666", - "text-halo-blur": 0.5, - "text-halo-color": "#ffffff", - "text-halo-width": 1 - } - }, - { - "id": "label_other", - "type": "symbol", - "source": "openmaptiles", - "source-layer": "place", - "minzoom": 8, - "filter": [ - "match", - [ - "get", - "class" - ], - [ - "city", - "continent", - "country", - "state", - "town", - "village" - ], - false, - true - ], - "layout": { - "text-field": [ - "case", - [ - "has", - "name:nonlatin" - ], - [ - "concat", - [ - "get", - "name:latin" - ], - "\n", - [ - "get", - "name:nonlatin" - ] - ], - [ - "coalesce", - [ - "get", - "name_en" - ], - [ - "get", - "name" - ] - ] - ], - "text-font": [ - "Noto Sans Italic" - ], - "text-letter-spacing": 0.1, - "text-max-width": 9, - "text-size": [ - "interpolate", - [ - "linear" - ], - [ - "zoom" - ], - 8, - 9, - 12, - 10 - ], - "text-transform": "uppercase" - }, - "paint": { - "text-color": "#333", - "text-halo-blur": 1, - "text-halo-color": "#fff", - "text-halo-width": 1 - } - }, - { - "id": "label_village", - "type": "symbol", - "source": "openmaptiles", - "source-layer": "place", - "minzoom": 9, - "filter": [ - "==", - [ - "get", - "class" - ], - "village" - ], - "layout": { - "icon-allow-overlap": true, - "icon-image": [ - "step", - [ - "zoom" - ], - "circle_11_black", - 10, - "" - ], - "icon-optional": false, - "icon-size": 0.2, - "text-anchor": "bottom", - "text-field": [ - "case", - [ - "has", - "name:nonlatin" - ], - [ - "concat", - [ - "get", - "name:latin" - ], - "\n", - [ - "get", - "name:nonlatin" - ] - ], - [ - "coalesce", - [ - "get", - "name_en" - ], - [ - "get", - "name" - ] - ] - ], - "text-font": [ - "Noto Sans Regular" - ], - "text-max-width": 8, - "text-size": [ - "interpolate", - [ - "exponential", - 1.2 - ], - [ - "zoom" - ], - 7, - 10, - 11, - 12 - ] - }, - "paint": { - "text-color": "#000", - "text-halo-blur": 1, - "text-halo-color": "#fff", - "text-halo-width": 1 - } - }, - { - "id": "label_town", - "type": "symbol", - "source": "openmaptiles", - "source-layer": "place", - "minzoom": 6, - "filter": [ - "==", - [ - "get", - "class" - ], - "town" - ], - "layout": { - "icon-allow-overlap": true, - "icon-image": [ - "step", - [ - "zoom" - ], - "circle_11_black", - 10, - "" - ], - "icon-optional": false, - "icon-size": 0.2, - "text-anchor": "bottom", - "text-field": [ - "case", - [ - "has", - "name:nonlatin" - ], - [ - "concat", - [ - "get", - "name:latin" - ], - "\n", - [ - "get", - "name:nonlatin" - ] - ], - [ - "coalesce", - [ - "get", - "name_en" - ], - [ - "get", - "name" - ] - ] - ], - "text-font": [ - "Noto Sans Regular" - ], - "text-max-width": 8, - "text-size": [ - "interpolate", - [ - "exponential", - 1.2 - ], - [ - "zoom" - ], - 7, - 12, - 11, - 14 - ] - }, - "paint": { - "text-color": "#000", - "text-halo-blur": 1, - "text-halo-color": "#fff", - "text-halo-width": 1 - } - }, - { - "id": "label_state", - "type": "symbol", - "source": "openmaptiles", - "source-layer": "place", - "minzoom": 5, - "maxzoom": 8, - "filter": [ - "==", - [ - "get", - "class" - ], - "state" - ], - "layout": { - "text-field": [ - "case", - [ - "has", - "name:nonlatin" - ], - [ - "concat", - [ - "get", - "name:latin" - ], - "\n", - [ - "get", - "name:nonlatin" - ] - ], - [ - "coalesce", - [ - "get", - "name_en" - ], - [ - "get", - "name" - ] - ] - ], - "text-font": [ - "Noto Sans Italic" - ], - "text-letter-spacing": 0.2, - "text-max-width": 9, - "text-size": [ - "interpolate", - [ - "linear" - ], - [ - "zoom" - ], - 5, - 10, - 8, - 14 - ], - "text-transform": "uppercase" - }, - "paint": { - "text-color": "#333", - "text-halo-blur": 1, - "text-halo-color": "#fff", - "text-halo-width": 1 - } - }, - { - "id": "label_city", - "type": "symbol", - "source": "openmaptiles", - "source-layer": "place", - "minzoom": 3, - "filter": [ - "all", - [ - "==", - [ - "get", - "class" - ], - "city" - ], - [ - "!=", - [ - "get", - "capital" - ], - 2 - ] - ], - "layout": { - "icon-allow-overlap": true, - "icon-image": [ - "step", - [ - "zoom" - ], - "circle_11_black", - 9, - "" - ], - "icon-optional": false, - "icon-size": 0.4, - "text-anchor": "bottom", - "text-field": [ - "case", - [ - "has", - "name:nonlatin" - ], - [ - "concat", - [ - "get", - "name:latin" - ], - "\n", - [ - "get", - "name:nonlatin" - ] - ], - [ - "coalesce", - [ - "get", - "name_en" - ], - [ - "get", - "name" - ] - ] - ], - "text-font": [ - "Noto Sans Regular" - ], - "text-max-width": 8, - "text-offset": [ - 0, - -0.1 - ], - "text-size": [ - "interpolate", - [ - "exponential", - 1.2 - ], - [ - "zoom" - ], - 4, - 11, - 7, - 13, - 11, - 18 - ] - }, - "paint": { - "text-color": "#000", - "text-halo-blur": 1, - "text-halo-color": "#fff", - "text-halo-width": 1 - } - }, - { - "id": "label_city_capital", - "type": "symbol", - "source": "openmaptiles", - "source-layer": "place", - "minzoom": 3, - "filter": [ - "all", - [ - "==", - [ - "get", - "class" - ], - "city" - ], - [ - "==", - [ - "get", - "capital" - ], - 2 - ] - ], - "layout": { - "icon-allow-overlap": true, - "icon-image": [ - "step", - [ - "zoom" - ], - "circle_11_black", - 9, - "" - ], - "icon-optional": false, - "icon-size": 0.5, - "text-anchor": "bottom", - "text-field": [ - "case", - [ - "has", - "name:nonlatin" - ], - [ - "concat", - [ - "get", - "name:latin" - ], - "\n", - [ - "get", - "name:nonlatin" - ] - ], - [ - "coalesce", - [ - "get", - "name_en" - ], - [ - "get", - "name" - ] - ] - ], - "text-font": [ - "Noto Sans Bold" - ], - "text-max-width": 8, - "text-offset": [ - 0, - -0.2 - ], - "text-size": [ - "interpolate", - [ - "exponential", - 1.2 - ], - [ - "zoom" - ], - 4, - 12, - 7, - 14, - 11, - 20 - ] - }, - "paint": { - "text-color": "#000", - "text-halo-blur": 1, - "text-halo-color": "#fff", - "text-halo-width": 1 - } - }, - { - "id": "label_country_3", - "type": "symbol", - "source": "openmaptiles", - "source-layer": "place", - "minzoom": 2, - "maxzoom": 9, - "filter": [ - "all", - [ - "==", - [ - "get", - "class" - ], - "country" - ], - [ - ">=", - [ - "get", - "rank" - ], - 3 - ] - ], - "layout": { - "text-field": [ - "case", - [ - "has", - "name:nonlatin" - ], - [ - "concat", - [ - "get", - "name:latin" - ], - "\n", - [ - "get", - "name:nonlatin" - ] - ], - [ - "coalesce", - [ - "get", - "name_en" - ], - [ - "get", - "name" - ] - ] - ], - "text-font": [ - "Noto Sans Bold" - ], - "text-max-width": 6.25, - "text-size": [ - "interpolate", - [ - "linear" - ], - [ - "zoom" - ], - 3, - 9, - 7, - 17 - ] - }, - "paint": { - "text-color": "#000", - "text-halo-blur": 1, - "text-halo-color": "#fff", - "text-halo-width": 1 - } - }, - { - "id": "label_country_2", - "type": "symbol", - "source": "openmaptiles", - "source-layer": "place", - "maxzoom": 9, - "filter": [ - "all", - [ - "==", - [ - "get", - "class" - ], - "country" - ], - [ - "==", - [ - "get", - "rank" - ], - 2 - ] - ], - "layout": { - "text-field": [ - "case", - [ - "has", - "name:nonlatin" - ], - [ - "concat", - [ - "get", - "name:latin" - ], - "\n", - [ - "get", - "name:nonlatin" - ] - ], - [ - "coalesce", - [ - "get", - "name_en" - ], - [ - "get", - "name" - ] - ] - ], - "text-font": [ - "Noto Sans Bold" - ], - "text-max-width": 6.25, - "text-size": [ - "interpolate", - [ - "linear" - ], - [ - "zoom" - ], - 2, - 9, - 5, - 17 - ] - }, - "paint": { - "text-color": "#000", - "text-halo-blur": 1, - "text-halo-color": "#fff", - "text-halo-width": 1 - } - }, - { - "id": "label_country_1", - "type": "symbol", - "source": "openmaptiles", - "source-layer": "place", - "maxzoom": 9, - "filter": [ - "all", - [ - "==", - [ - "get", - "class" - ], - "country" - ], - [ - "==", - [ - "get", - "rank" - ], - 1 - ] - ], - "layout": { - "text-field": [ - "case", - [ - "has", - "name:nonlatin" - ], - [ - "concat", - [ - "get", - "name:latin" - ], - "\n", - [ - "get", - "name:nonlatin" - ] - ], - [ - "coalesce", - [ - "get", - "name_en" - ], - [ - "get", - "name" - ] - ] - ], - "text-font": [ - "Noto Sans Bold" - ], - "text-max-width": 6.25, - "text-size": [ - "interpolate", - [ - "linear" - ], - [ - "zoom" - ], - 1, - 9, - 4, - 17 - ] - }, - "paint": { - "text-color": "#000", - "text-halo-blur": 1, - "text-halo-color": "#fff", - "text-halo-width": 1 - } - }, - { - "id": "vigo_traffic", - "type": "line", - "source": "vigo_traffic", - "layout": {}, - "paint": { - "line-opacity": [ - "interpolate", - [ - "linear" - ], - [ - "zoom" - ], - 0, - 1, - 14, - 1, - 16, - 0.8, - 18, - 0.6, - 22, - 0.6 - ], - "line-color": [ - "match", - [ - "get", - "style" - ], - "#CONGESTION", - "hsl(70.7 100% 38%)", - "#MUYDENSO", - "hsl(36.49 100% 50%)", - "#DENSO", - "hsl(47.61 100% 49%)", - "#FLUIDO", - "hsl(83.9 100% 40%)", - "#MUYFLUIDO", - "hsl(161.25 100% 42%)", - "hsl(0.0 0% 0%)" - ], - "line-width": [ - "interpolate", - [ - "linear" - ], - [ - "zoom" - ], - 14, - 2, - 18, - 4 - ] - } - } - ] -} diff --git a/src/frontend/public/maps/styles/openfreemap-light.json b/src/frontend/public/maps/styles/openfreemap-light.json index b8a33ac..da5a788 100644 --- a/src/frontend/public/maps/styles/openfreemap-light.json +++ b/src/frontend/public/maps/styles/openfreemap-light.json @@ -879,32 +879,7 @@ 16, 1 ], - "fill-outline-color": "#dfdbd7", - "fill-translate": [ - "interpolate", - [ - "linear" - ], - [ - "zoom" - ], - 14, - [ - "literal", - [ - 0, - 0 - ] - ], - 16, - [ - "literal", - [ - -2, - -2 - ] - ] - ] + "fill-outline-color": "#dfdbd7" } }, { -- cgit v1.3