-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Tiles not drawn when other tiles have CORS errors #12024
Comments
Hi @fr-an-k, Could you please provide more details about your environment (OS), whether this happens in all browsers or just one, are there any warnings in the console, etc.? |
Same happens in Firefox and Edge except in these instance the tiles appear when going to the left; I suspect a shader issue. Windows 11 Pro 21H2, build 22000.739 |
Oh wait I do get errors; some tiles don't exist in the panned-to area, and as a consequence return HTTP status code 403 (forbidden). This probably interrupts the rest of the tile display proces somehow. Sorry about that, I'll have to investigate this further myself. |
It was a CORS issue (fetch exception, probably of another tile) that probably blocked an internal tile callback of a visible tile. I solved it with a hack ( custom source type, overriding some internal Mapbox class); unfortunately it's still not 100%, I suspect a cancelled tile is being cached as a missing tile and therefore not reloaded when visiting the area again. Probably due to my limited knowledge of the Mapbox internals. Ideally Mapbox would decouple HTTP from the tile mapping system and allow a custom tile blob loader. The use case for this would be offline(-first) functionality, custom fetching (handle CORS errors), and client-side image processing, without resorting to a hack or service worker (which does not implement the cancel signal and therefore causes onworkable map stuttering). |
Thanks for the feedback, @fr-an-k We have an experimental Custom Source API that decouples data fetching from the tiling. You can try this example https://github.com/mapbox/mapbox-gl-js/blob/80e5afd1babdac879cc63dfd2abab4c3bc760837/debug/custom-source.html. |
mapbox-gl-js version:
All 2.x versions up to 2.9.0
browser:
Chrome Version 102.0.5005.115 (Official Build) (64-bit)
Steps to Trigger Behavior
Happens regularly in vector tile sources.
Screenshot
Expected Behavior
Show my tiles
Actual Behavior
Tiles disappear when moving left beyond a certain x coordinate.
The text was updated successfully, but these errors were encountered: