Skip to content

Commit b284178

Browse files
committed
add RTL support
1 parent a7347bf commit b284178

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

website/public/scripts/map.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@ function initMap() {
1717

1818
document.getElementById('mapbg-image').style.opacity = '0.5'
1919

20+
// RTL support, optional
21+
maplibregl.setRTLTextPlugin(
22+
'https://unpkg.com/@mapbox/[email protected]/dist/mapbox-gl-rtl-text.js',
23+
true, // Lazy load the plugin
24+
)
25+
2026
const map = new maplibregl.Map({
2127
style: 'https://tiles.openfreemap.org/styles/liberty',
2228
center: berlin.center,

0 commit comments

Comments
 (0)