Skip to content

Commit 85ea63c

Browse files
committed
Add mapbox-gl-rtl-text library
This adds support for RTL languages (Arabic and Hebrew) in the basemaps. Without this library the RTL languages appear backwards.
1 parent daeddfd commit 85ea63c

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

x-pack/legacy/plugins/maps/public/connected_components/map/mb/view.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import { getGlyphUrl, isRetina } from '../../../meta';
1616
import { DECIMAL_DEGREES_PRECISION, ZOOM_PRECISION } from '../../../../common/constants';
1717
import mapboxgl from 'mapbox-gl/dist/mapbox-gl-csp';
1818
import mbWorkerUrl from '!!file-loader!mapbox-gl/dist/mapbox-gl-csp-worker';
19+
import mbRtlPlugin from '!!file-loader!@mapbox/mapbox-gl-rtl-text/mapbox-gl-rtl-text.min.js';
1920
import chrome from 'ui/chrome';
2021
import { spritesheet } from '@elastic/maki';
2122
import sprites1 from '@elastic/maki/dist/[email protected]';
@@ -24,6 +25,7 @@ import { DrawControl } from './draw_control';
2425
import { TooltipControl } from './tooltip_control';
2526

2627
mapboxgl.workerUrl = mbWorkerUrl;
28+
mapboxgl.setRTLTextPlugin(mbRtlPlugin);
2729

2830
export class MBMapContainer extends React.Component {
2931
state = {

x-pack/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@
190190
"@kbn/interpreter": "1.0.0",
191191
"@kbn/ui-framework": "1.0.0",
192192
"@mapbox/mapbox-gl-draw": "^1.1.1",
193+
"@mapbox/mapbox-gl-rtl-text": "0.2.3",
193194
"@scant/router": "^0.1.0",
194195
"@slack/webhook": "^5.0.0",
195196
"@turf/boolean-contains": "6.0.1",

yarn.lock

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2204,6 +2204,11 @@
22042204
lodash.isequal "^4.2.0"
22052205
xtend "^4.0.1"
22062206

2207+
2208+
version "0.2.3"
2209+
resolved "https://registry.yarnpkg.com/@mapbox/mapbox-gl-rtl-text/-/mapbox-gl-rtl-text-0.2.3.tgz#a26ecfb3f0061456d93ee8570dd9587d226ea8bd"
2210+
integrity sha512-RaCYfnxULUUUxNwcUimV9C/o2295ktTyLEUzD/+VWkqXqvaVfFcZ5slytGzb2Sd/Jj4MlbxD0DCZbfa6CzcmMw==
2211+
22072212
"@mapbox/mapbox-gl-supported@^1.4.0":
22082213
version "1.4.0"
22092214
resolved "https://registry.yarnpkg.com/@mapbox/mapbox-gl-supported/-/mapbox-gl-supported-1.4.0.tgz#36946b22944fe2cfa43cfafd5ef36fdb54a069e4"

0 commit comments

Comments
 (0)