From ee1946bd183424aceb04963308491e21b223d4e6 Mon Sep 17 00:00:00 2001 From: Randa <82415612+randa-11295@users.noreply.github.com> Date: Sat, 4 Nov 2023 18:05:42 +0200 Subject: [PATCH 1/2] Update MapLibreGlWrapper.ts add plugin Mapbox ttl --- src/components/MapLibreMap/lib/MapLibreGlWrapper.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/components/MapLibreMap/lib/MapLibreGlWrapper.ts b/src/components/MapLibreMap/lib/MapLibreGlWrapper.ts index a346ab4aa..18e7cd6b8 100644 --- a/src/components/MapLibreMap/lib/MapLibreGlWrapper.ts +++ b/src/components/MapLibreMap/lib/MapLibreGlWrapper.ts @@ -12,6 +12,16 @@ import { StyleImageMetadata, } from 'maplibre-gl'; import { Map as MapType, Style } from 'maplibre-gl'; +import maplibregl from 'maplibre-gl'; + +maplibregl.setRTLTextPlugin( + 'https://unpkg.com/@mapbox/mapbox-gl-rtl-text@0.2.3/mapbox-gl-rtl-text.min.js', + (res) => { + console.log(res); + }, + true // Lazy load the plugin +); + type WrapperEventArgArray = [string, (arg0: unknown) => void]; type EventArgArray = [ From 5c794ff1440ecb6c71165e6d7fe3828e5ade05a7 Mon Sep 17 00:00:00 2001 From: "randa.ibrahim" Date: Sun, 5 Nov 2023 17:33:07 +0200 Subject: [PATCH 2/2] update add RtL Plugin --- .../components/MapLibreMap/lib/MapLibreGlWrapper.d.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/dist/components/MapLibreMap/lib/MapLibreGlWrapper.d.ts b/dist/components/MapLibreMap/lib/MapLibreGlWrapper.d.ts index 042826678..6d2e927ae 100644 --- a/dist/components/MapLibreMap/lib/MapLibreGlWrapper.d.ts +++ b/dist/components/MapLibreMap/lib/MapLibreGlWrapper.d.ts @@ -1,5 +1,16 @@ import { IControl, MapOptions as MapOptionsType } from "!maplibre-gl"; import { Map as MapType } from "maplibre-gl"; +import maplibreGl from "maplibre-gl"; + +maplibreGl.setRTLTextPlugin( + 'https://unpkg.com/@mapbox/mapbox-gl-rtl-text@0.2.3/mapbox-gl-rtl-text.min.js', + (res) => { + console.log(res); + }, + true // Lazy load the plugin +); + + declare type EventArgArray = [string, string | Function, Function?]; declare type LayerState = { id: string;