Skip to content
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

Text is backwards in RTL language basemaps #204

Closed
gavinr-maps opened this issue Oct 12, 2023 · 2 comments
Closed

Text is backwards in RTL language basemaps #204

gavinr-maps opened this issue Oct 12, 2023 · 2 comments
Assignees

Comments

@gavinr-maps
Copy link
Contributor

gavinr-maps commented Oct 12, 2023

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:

  1. Open this sample that uses the ArcGIS API for JavaScript: https://jsbin.com/qohubem/2/edit?html,output

    • image
  2. In a separate tab, open this sample that uses Esri Leaflet Vector: https://jsbin.com/qategug/edit?html,output

    • image
  3. 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:

  1. Open this sample that uses the ArcGIS API for JavaScript: https://jsbin.com/nilekem/2/edit?html,output

    • image
  2. In a separate tab, open this sample that uses Esri Leaflet Vector: https://jsbin.com/fajowaw/edit?html,output

    • image
  3. 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/

@gavinr-maps
Copy link
Contributor Author

@gowin20 is planning on updating the Esri Leaflet Vector documentation and samples to show how to use the plugin to properly display RTL languages! Thanks @gowin20 :) !

@gavinr-maps
Copy link
Contributor Author

This is resolved in #207 and that PR will be released soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants