diff options
author | Anton Tananaev <anton@traccar.org> | 2024-05-12 13:47:16 -0700 |
---|---|---|
committer | Anton Tananaev <anton@traccar.org> | 2024-05-12 13:47:16 -0700 |
commit | bac808ebfaafc22dc7d7f8ec445eb8f87bbad784 (patch) | |
tree | c2062c18e60a467e4417608e56664459b5a6f3f1 /src | |
parent | b32a43a277fed24e51f5776b495bfbd670d8cb80 (diff) | |
download | trackermap-web-bac808ebfaafc22dc7d7f8ec445eb8f87bbad784.tar.gz trackermap-web-bac808ebfaafc22dc7d7f8ec445eb8f87bbad784.tar.bz2 trackermap-web-bac808ebfaafc22dc7d7f8ec445eb8f87bbad784.zip |
Support RTL languages on map
Diffstat (limited to 'src')
-rw-r--r-- | src/map/core/MapView.jsx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/map/core/MapView.jsx b/src/map/core/MapView.jsx index 35b3a65a..2fadf810 100644 --- a/src/map/core/MapView.jsx +++ b/src/map/core/MapView.jsx @@ -1,5 +1,6 @@ import 'maplibre-gl/dist/maplibre-gl.css'; import maplibregl from 'maplibre-gl'; +import mapboxglRtlTextUrl from '@mapbox/mapbox-gl-rtl-text/mapbox-gl-rtl-text.min.js?url' import React, { useRef, useLayoutEffect, useEffect, useState, } from 'react'; @@ -14,6 +15,8 @@ element.style.width = '100%'; element.style.height = '100%'; element.style.boxSizing = 'initial'; +maplibregl.setRTLTextPlugin(mapboxglRtlTextUrl); + export const map = new maplibregl.Map({ container: element, attributionControl: false, |