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 labels not showing for certain vector tile layers #121

Open
gavinr opened this issue Feb 24, 2022 · 1 comment
Open

Text labels not showing for certain vector tile layers #121

gavinr opened this issue Feb 24, 2022 · 1 comment

Comments

@gavinr
Copy link
Contributor

gavinr commented Feb 24, 2022

Issue summary

When using Esri Leaflet Vector to add vector tile basemap layers in other languages, on some langauges (like Arabic) the text labels do not show on in the layer.

Italian is working:

See web map 4d1c336e57504552a04552600122f96a:

Arabic is not working:

See web map 8e0c793963b74220b0d18bbd332372cc:

Potential Cause

If you look at the style root.json, you'll see that text-font is an array, and the layer should "Fall back" to the second font if the first one is not found.

image

Is it possible that this "falling back" to Arial Unicode MS Regular is not happening and thus the font is not showing?

@jwasilgeo
Copy link
Contributor

We indeed manipulate the text-font here in the source Util helper function: https://github.com/Esri/esri-leaflet-vector/blob/v3.1.1/src/Util.js#L161-L171

Which is used by the L.esri.Vector.vectorTileLayer here: https://github.com/Esri/esri-leaflet-vector/blob/v3.1.1/src/VectorTileLayer.js#L72

The mapbox style spec says it can be an array of strings: https://docs.mapbox.com/mapbox-gl-js/style-spec/layers/#layout-symbol-text-font

@patrickarlt do you recall the reason we decided to only keep the 1st? And can we change this to keep any/all that exist in the incoming style object?

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