You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
RTL plugin lazy loading doesn't work on GeoJSON source #9075
Hey @kkaefer , I think @hyperknot is referring to lazy loading the plugin, and not the docs example which loads it synchronously.
I think this still might be an outstanding issue with adding rtl text based labels via GeoJSON. Is that what you mean by pt 3. @hyperknot ?
@arindam1993 yes, I'm adding text labels via GeoJSON! That's where the whole lazy loading makes sense!
95% of my users are on non RTL regions, hence I would like to make the bundle + plugin loading size as small as possible for them. But at the same time 5% of the users need the RTL plugin, so it'd be important to load it only for those users.
I mean what other use cases can be considered registered which received the recent support in 1.60?
I'll try to make a minimal repro case / test file which you can include in your test suite.
I mean what other use cases can be considered registered which received the recent support
The other use case is with vector tiles for the basemap, wherein you start your viewport somewhere without rtl text and then move over to an area with rtl text.
Activity
ryanhamley commentedon Dec 5, 2019
cc @arindam1993
kkaefer commentedon Dec 6, 2019
@hyperknot looking at the example at https://docs.mapbox.com/mapbox-gl-js/example/mapbox-gl-rtl-text/, right-to-left text seems to work as intended. If you believe it doesn't, please provide a reproduction website (e.g. via [jsfiddle.net]https://jsfiddle.net/)). Please include information about the browser version and operating system used.
arindam1993 commentedon Dec 9, 2019
Hey @kkaefer , I think @hyperknot is referring to lazy loading the plugin, and not the docs example which loads it synchronously.
I think this still might be an outstanding issue with adding rtl text based labels via GeoJSON. Is that what you mean by pt 3. @hyperknot ?
hyperknot commentedon Dec 9, 2019
@arindam1993 yes, I'm adding text labels via GeoJSON! That's where the whole lazy loading makes sense!
95% of my users are on non RTL regions, hence I would like to make the bundle + plugin loading size as small as possible for them. But at the same time 5% of the users need the RTL plugin, so it'd be important to load it only for those users.
I mean what other use cases can be considered registered which received the recent support in 1.60?
I'll try to make a minimal repro case / test file which you can include in your test suite.
arindam1993 commentedon Dec 9, 2019
The other use case is with vector tiles for the basemap, wherein you start your viewport somewhere without rtl text and then move over to an area with rtl text.
hyperknot commentedon Dec 9, 2019
I see. So there is indeed a bug, that is: lazy loading doesn't work on GeoJSON sources.
I believe there should be a test case for:
[-]RTL plugin lazy loading broken in 1.60[/-][+]RTL plugin lazy loading doesn't work on GeoJSON source[/+]arindam1993 commentedon Dec 10, 2019
I can confirm this is indeed the issue, here's a js fiddle with a test case :
https://jsfiddle.net/egyoam5t/3/
hyperknot commentedon Dec 10, 2019
@arindam1993 thanks so much for creating the fiddle!
arindam1993 commentedon Dec 10, 2019
#9091 is up which fixes the issue.
Here's a jsfiddle with the latest build that demonstrates that the issue has been fixed.
https://jsfiddle.net/egyoam5t/6/