-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
RTL plugin lazy loading doesn't work on GeoJSON source #9075
Comments
cc @arindam1993 |
@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. |
Hey @kkaefer , I think @hyperknot is referring to lazy loading the plugin, and not the docs example which loads it synchronously. |
@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. |
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. |
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:
|
I can confirm this is indeed the issue, here's a js fiddle with a test case : |
@arindam1993 thanks so much for creating the fiddle! |
#9091 is up which fixes the issue. Here's a jsfiddle with the latest build that demonstrates that the issue has been fixed. |
mapbox-gl-js version: 1.60
browser: Chrome latest stable
Steps to Trigger Behavior
Expected Behavior
Network panel should load the RTL plugin + the matching PBF files
Actual Behavior
RTL plugin does not get loaded + matching PBF files are not loaded either
Nothing is visible on the map in place of the text.
The text was updated successfully, but these errors were encountered: