add RTL plugin

This commit is contained in:
Zsolt Ero
2024-09-24 15:30:41 +02:00
parent 0c20012d44
commit 11c6a395bc

View File

@@ -17,6 +17,11 @@ function initMap() {
document.getElementById('mapbg-image').style.opacity = '0.5' document.getElementById('mapbg-image').style.opacity = '0.5'
maplibregl.setRTLTextPlugin(
'https://unpkg.com/@mapbox/mapbox-gl-rtl-text/mapbox-gl-rtl-text.min.js',
true, // Lazy load the plugin
)
const map = new maplibregl.Map({ const map = new maplibregl.Map({
style: 'https://tiles.openfreemap.org/styles/liberty', style: 'https://tiles.openfreemap.org/styles/liberty',
center: berlin.center, center: berlin.center,