From bac808ebfaafc22dc7d7f8ec445eb8f87bbad784 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sun, 12 May 2024 13:47:16 -0700 Subject: Support RTL languages on map --- src/map/core/MapView.jsx | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') 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, -- cgit v1.2.3