-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a static "setRTLTextPlugin" method #206
Comments
This Library module still doesn't use setRTLTextPlugin declare module 'esri-leaflet-vector' { I am using esri-leaflet-vector latest version. |
Hi @OwaisNadeemCentric please try with the newly-released v4.2.2: Example is here: https://github.com/Esri/esri-leaflet-vector/blob/master/examples/rtl-language.html |
Hi @gavinr-maps we need this method as well getRTLTextPluginStatus() to check the status of the plugin if it is already loaded or not otherwise you will get the following error if we call RTLTextPlugin multiple times. ERROR Error: setRTLTextPlugin cannot be called multiple times. |
A potential solution for this error is to ensure that you call the getRTLTextPlugin function only at the application's root level. Otherwise, you may encounter an error. |
Describe the problem
As outlined in #204, right-to-left languages such as Arabic currently display backwards in Esri Leaflet Vector. Since this plugin depends on maplibre, the fix is to call
maplibregl.setRTLTextPlugin()
; a top-level static maplibre method. This is not currently possible for Esri Leaflet Vector users to do, so we need to expose thissetRTLTextPlugin
method.Describe the proposed solution
I would like to add a top-level static method called
setRTLTextPlugin
to this library that simply calls the equivalent maplibre method. This would mirror the functionality of maplibre and would make it easier for users to understand why they need to pass a Mapbox plugin to their Leaflet library to display a map in Arabic.Alternatives considered
An alternative is to make the
setRTLTextPlugin
method a member ofVectorBasemapLayer
, but I believe making it a top-level static method is the best choice as that most closely mirrors maplibre.Additional Information
No response
The text was updated successfully, but these errors were encountered: