Add maplibre RTL text plugin to improve text rendering. (#30)
diff --git a/src/components/map/index.tsx b/src/components/map/index.tsx
index d98cdc4..054731f 100644
--- a/src/components/map/index.tsx
+++ b/src/components/map/index.tsx
@@ -62,6 +62,14 @@
// Initialize map when component mounts
useEffect(() => {
+ if (maplibregl.getRTLTextPluginStatus() === 'unavailable') {
+ maplibregl.setRTLTextPlugin(
+ 'https://unpkg.com/@mapbox/mapbox-gl-rtl-text@0.2.3/mapbox-gl-rtl-text.min.js',
+ null,
+ true
+ );
+ }
+
const initMap = async () => {
if (ipToLoc) {
try {