add RTL support

This commit is contained in:
Zsolt Ero
2024-09-25 14:43:00 +02:00
parent a7347bf595
commit b2841785ea

View File

@@ -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,