From b2841785ea8c1f5aa925f510dea1f95269c6ce29 Mon Sep 17 00:00:00 2001 From: Zsolt Ero Date: Wed, 25 Sep 2024 14:43:00 +0200 Subject: [PATCH] add RTL support --- website/public/scripts/map.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/website/public/scripts/map.js b/website/public/scripts/map.js index 0528614..573a079 100644 --- a/website/public/scripts/map.js +++ b/website/public/scripts/map.js @@ -17,6 +17,12 @@ function initMap() { document.getElementById('mapbg-image').style.opacity = '0.5' + // RTL support, optional + maplibregl.setRTLTextPlugin( + 'https://unpkg.com/@mapbox/mapbox-gl-rtl-text@0.3.0/dist/mapbox-gl-rtl-text.js', + true, // Lazy load the plugin + ) + const map = new maplibregl.Map({ style: 'https://tiles.openfreemap.org/styles/liberty', center: berlin.center,