Text is backwards in RTL language basemaps
gavinr-maps opened this issue · 2 comments
Describe the bug
The languages sample we have in the repo includes right-to-left (RTL) languages like Arabic. When those languages are chosen in the sample, the text is in the wrong direction (it is left-to-right instead of right-to-left).
Reproduction
Arabic:
-
Open this sample that uses the ArcGIS API for JavaScript: https://jsbin.com/qohubem/2/edit?html,output
-
In a separate tab, open this sample that uses Esri Leaflet Vector: https://jsbin.com/qategug/edit?html,output
-
Compare the two maps
- Expected: The map labels should look the same
- Actual: the text in the Esri Leaflet Vector sample is backwards when compared with the ArcGIS API for JavaScript sample.
Hebrew:
Same thing for Hebrew, which is another right-to-left language:
-
Open this sample that uses the ArcGIS API for JavaScript: https://jsbin.com/nilekem/2/edit?html,output
-
In a separate tab, open this sample that uses Esri Leaflet Vector: https://jsbin.com/fajowaw/edit?html,output
-
Compare the two maps
- Expected: The map labels should look the same
- Actual: the text in the Esri Leaflet Vector sample is backwards when compared with the ArcGIS API for JavaScript sample.
Logs
No response
System Info
- Leaflet 1.9.4
- Esri Leaflet 3.0.11
- Esri Leaflet Vector 4.1.0
Additional Information
I don't think this is a bug with Esri Leaflet Vector - I think we just need to document how to properly use RTL languages using
https://github.com/mapbox/mapbox-gl-rtl-text (via maplibre/maplibre-gl-js#220 (comment)). I think once we have an example of properly using that plugin, we must properly document how to use it in our languages sample as well as other places in the doc, like https://developers.arcgis.com/esri-leaflet/maps/change-the-place-label-language/
This is resolved in #207 and that PR will be released soon.