mirror of
https://github.com/hyperknot/openfreemap.git
synced 2026-05-21 14:02:15 +00:00
add RTL support
This commit is contained in:
@@ -17,6 +17,12 @@ function initMap() {
|
|||||||
|
|
||||||
document.getElementById('mapbg-image').style.opacity = '0.5'
|
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({
|
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,
|
||||||
|
|||||||
Reference in New Issue
Block a user