Add mapbox-gl-rtl-text library (#54842)
This adds support for RTL languages (Arabic and Hebrew) in the basemaps. Without this library the RTL languages appear backwards.
This commit is contained in:
parent
b4e42d52c0
commit
2e7b35e232
|
@ -16,6 +16,7 @@ import { getGlyphUrl, isRetina } from '../../../meta';
|
||||||
import { DECIMAL_DEGREES_PRECISION, ZOOM_PRECISION } from '../../../../common/constants';
|
import { DECIMAL_DEGREES_PRECISION, ZOOM_PRECISION } from '../../../../common/constants';
|
||||||
import mapboxgl from 'mapbox-gl/dist/mapbox-gl-csp';
|
import mapboxgl from 'mapbox-gl/dist/mapbox-gl-csp';
|
||||||
import mbWorkerUrl from '!!file-loader!mapbox-gl/dist/mapbox-gl-csp-worker';
|
import mbWorkerUrl from '!!file-loader!mapbox-gl/dist/mapbox-gl-csp-worker';
|
||||||
|
import mbRtlPlugin from '!!file-loader!@mapbox/mapbox-gl-rtl-text/mapbox-gl-rtl-text.min.js';
|
||||||
import chrome from 'ui/chrome';
|
import chrome from 'ui/chrome';
|
||||||
import { spritesheet } from '@elastic/maki';
|
import { spritesheet } from '@elastic/maki';
|
||||||
import sprites1 from '@elastic/maki/dist/sprite@1.png';
|
import sprites1 from '@elastic/maki/dist/sprite@1.png';
|
||||||
|
@ -24,6 +25,7 @@ import { DrawControl } from './draw_control';
|
||||||
import { TooltipControl } from './tooltip_control';
|
import { TooltipControl } from './tooltip_control';
|
||||||
|
|
||||||
mapboxgl.workerUrl = mbWorkerUrl;
|
mapboxgl.workerUrl = mbWorkerUrl;
|
||||||
|
mapboxgl.setRTLTextPlugin(mbRtlPlugin);
|
||||||
|
|
||||||
export class MBMapContainer extends React.Component {
|
export class MBMapContainer extends React.Component {
|
||||||
state = {
|
state = {
|
||||||
|
|
|
@ -190,6 +190,7 @@
|
||||||
"@kbn/interpreter": "1.0.0",
|
"@kbn/interpreter": "1.0.0",
|
||||||
"@kbn/ui-framework": "1.0.0",
|
"@kbn/ui-framework": "1.0.0",
|
||||||
"@mapbox/mapbox-gl-draw": "^1.1.1",
|
"@mapbox/mapbox-gl-draw": "^1.1.1",
|
||||||
|
"@mapbox/mapbox-gl-rtl-text": "0.2.3",
|
||||||
"@scant/router": "^0.1.0",
|
"@scant/router": "^0.1.0",
|
||||||
"@slack/webhook": "^5.0.0",
|
"@slack/webhook": "^5.0.0",
|
||||||
"@turf/boolean-contains": "6.0.1",
|
"@turf/boolean-contains": "6.0.1",
|
||||||
|
|
|
@ -2205,6 +2205,11 @@
|
||||||
lodash.isequal "^4.2.0"
|
lodash.isequal "^4.2.0"
|
||||||
xtend "^4.0.1"
|
xtend "^4.0.1"
|
||||||
|
|
||||||
|
"@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":
|
"@mapbox/mapbox-gl-supported@^1.4.0":
|
||||||
version "1.4.0"
|
version "1.4.0"
|
||||||
resolved "https://registry.yarnpkg.com/@mapbox/mapbox-gl-supported/-/mapbox-gl-supported-1.4.0.tgz#36946b22944fe2cfa43cfafd5ef36fdb54a069e4"
|
resolved "https://registry.yarnpkg.com/@mapbox/mapbox-gl-supported/-/mapbox-gl-supported-1.4.0.tgz#36946b22944fe2cfa43cfafd5ef36fdb54a069e4"
|
||||||
|
|
Loading…
Reference in a new issue