Is it possible initialising mapboxgl with RTL support could be added? This is detailed in this Mapbox example:
https://www.mapbox.com/mapbox-gl-js/example/mapbox-gl-rtl-text/
The key line being:
mapboxgl.setRTLTextPlugin('https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-rtl-text/v0.1.2/mapbox-gl-rtl-text.js')
I may be wrong but I couldn't find a way of doing this with this package so had to fork it and build a slightly hacky version for now. Ideally I suppose the ReactMapboxGl options would include an optional RTL plugin URL, which if included would initialise the plugin.
Hey @DaveBathnes,
I had the same issue and I could fix it without making any changes into the library. Since you've installed mapbox-gl package alongside this library, you can do the following before you start using it:
import { setRTLTextPlugin } from 'mapbox-gl';
and then:
setRTLTextPlugin('https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-rtl-text/v0.1.2/mapbox-gl-rtl-text.js');
thank you @jmosawy it worked for me ....
import { setRTLTextPlugin } from "mapbox-gl";
setRTLTextPlugin(
"https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-rtl-text/v0.2.3/mapbox-gl-rtl-text.js",
null,
true
);
https://docs.mapbox.com/mapbox-gl-js/example/mapbox-gl-rtl-text/
Most helpful comment
https://docs.mapbox.com/mapbox-gl-js/example/mapbox-gl-rtl-text/