How do I support Right to Left languages with this component? Is there a way to get a handle to mapboxgl and call setRTLTextPlugin?
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
Most helpful comment
This solution has worked for me.
You can just require the mapbox library again and call the method as below: