diff --git a/package.json b/package.json index 542f10a0..b4bc91ce 100644 --- a/package.json +++ b/package.json @@ -60,6 +60,7 @@ "@elastic/datemath": "^5.0.2", "@elastic/ems-client": "^7.2.2", "@elastic/eui": "^14.8.0", + "@mapbox/mapbox-gl-rtl-text": "^0.2.3", "@turf/bbox": "6.0.1", "@turf/center": "6.0.1", "mapbox-gl": "1.5.0", diff --git a/public/js/components/map.js b/public/js/components/map.js index e1312515..fa598d1c 100644 --- a/public/js/components/map.js +++ b/public/js/components/map.js @@ -5,10 +5,14 @@ */ import mapboxgl from 'mapbox-gl'; +// eslint-disable-next-line import/no-unresolved +import mbRtlPlugin from '!!file-loader!@mapbox/mapbox-gl-rtl-text/mapbox-gl-rtl-text.min.js'; import turfBbox from '@turf/bbox'; import turfCenter from '@turf/center'; import React, { Component } from 'react'; +mapboxgl.setRTLTextPlugin(mbRtlPlugin); + export class Map extends Component { static isSupported() { diff --git a/yarn.lock b/yarn.lock index 87980c4a..24d9872b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -800,6 +800,7 @@ "@elastic/eslint-config-kibana@^0.15.0": version "0.15.0" resolved "https://registry.yarnpkg.com/@elastic/eslint-config-kibana/-/eslint-config-kibana-0.15.0.tgz#a552793497cdfc1829c2f9b7cd7018eb008f1606" + integrity sha1-pVJ5NJfN/Bgpwvm3zXAY6wCPFgY= "@elastic/eui@^14.8.0": version "14.8.0" @@ -1105,6 +1106,11 @@ resolved "https://registry.yarnpkg.com/@mapbox/jsonlint-lines-primitives/-/jsonlint-lines-primitives-2.0.2.tgz#ce56e539f83552b58d10d672ea4d6fc9adc7b234" integrity sha1-zlblOfg1UrWNENZy6k1vya3HsjQ= +"@mapbox/mapbox-gl-rtl-text@^0.2.3": + version "0.2.3" + resolved "https://registry.yarnpkg.com/@mapbox/mapbox-gl-rtl-text/-/mapbox-gl-rtl-text-0.2.3.tgz#a26ecfb3f0061456d93ee8570dd9587d226ea8bd" + integrity sha512-RaCYfnxULUUUxNwcUimV9C/o2295ktTyLEUzD/+VWkqXqvaVfFcZ5slytGzb2Sd/Jj4MlbxD0DCZbfa6CzcmMw== + "@mapbox/mapbox-gl-supported@^1.4.0": version "1.4.0" resolved "https://registry.yarnpkg.com/@mapbox/mapbox-gl-supported/-/mapbox-gl-supported-1.4.0.tgz#36946b22944fe2cfa43cfafd5ef36fdb54a069e4"