React-map-gl: RTLTextPlugin

Created on 7 Apr 2018  路  2Comments  路  Source: visgl/react-map-gl

How do I support Right to Left languages with this component? Is there a way to get a handle to mapboxgl and call setRTLTextPlugin?

Most helpful comment

This solution has worked for me.
You can just require the mapbox library again and call the method as below:

import MapGL, { Marker, Popup } from 'react-map-gl';
const mapboxgl =  require('mapbox-gl') ;
mapboxgl.setRTLTextPlugin('https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-rtl-text/v0.1.2/mapbox-gl-rtl-text.js');

All 2 comments

This solution has worked for me.
You can just require the mapbox library again and call the method as below:

import MapGL, { Marker, Popup } from 'react-map-gl';
const mapboxgl =  require('mapbox-gl') ;
mapboxgl.setRTLTextPlugin('https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-rtl-text/v0.1.2/mapbox-gl-rtl-text.js');

I have tried this, but unfortunately didn't work for me

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sachinshettigar picture sachinshettigar  路  13Comments

tsibley picture tsibley  路  13Comments

tmhn picture tmhn  路  25Comments

ibgreen picture ibgreen  路  27Comments

thanhphuong612 picture thanhphuong612  路  41Comments