-
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
6768 overdraw fix #6803
6768 overdraw fix #6803
Conversation
b6f0cf2
to
04a1cf7
Compare
@mollymerp Do you have anything to add to this? Anything I'm forgetting to mention? |
Are you sure this is how native works? I was under the impression that it also overzooms parent tiles when receiving a 204/404 and the same issue exists there. (Note that a tile 404 actually does not produce I wonder if there are many cases of users relying on the current behavior of overzooming parent tiles when a 204/404 occurs. It isn't as important for vector sources as it is for raster sources, where heterogenous maximum zoom levels are common, but there's probably cases where it's expected -- #6783 was a recent example, and possibly #5013. |
@jfirebaugh thanks for the clarification around the 404 handling – TIL. In that code you linked, the 404s then do not cause |
I think this is the relevant change in native where we started rendering errored/empty tiles mapbox/mapbox-gl-native#10011
trueee 😅 I do see what you mean about users relying on parent tile overzooming when tiles 404. maybe the check we discussed before (don't retain parent tiles if at least one child successfully loads and one child 404s/errors) will have fewer side-effects than this change |
Yeah I can confirm actually that #5013 is worse with this solution. The overzoomed tiles fail completely 😞 I assume the same is true for the other issue John pointed out. So this actually isn't going to work. We didn't anticipate this use case. |
picking this back up in favor of #7051. per chat, this is what native does, and we should keep behavior consistent cross-platform. note that we'll still want to revise our strategy if/when we implement server-side 204 responses for |
note that #5013 was an issue with how the tileset was generated, overzooming at ZL > tileset maxzoom still works w this PR. |
Let's see if we can write a render test for this. Here's a sketch:
There might be a reason why a render test of this type doesn't work, but let's give it a shot. It would be nice for maintaining parity in behavior between js and native. |
04a1cf7
to
ca1963d
Compare
@jfirebaugh What makes you say that a render test like the one you described may not work? The test I have set up produces the expected output of just a background color, but it does this with or without the fix. I'm unable to produce a failing test. This is the test I'm running for reference:
The sparse tile set is a 0/0/0 tile and I've confirmed that this is attempting to load 1/0/0 and 1/1/0, both of which are resulting in a 404 error. |
It's out of the norm for render tests, which tends to make things tricky. Not being able to produce a failing test is a common way for this to manifest. It means you'll have to debug the "expected to be failing" case to see why it's not failing. In this case, we expect it to be failing because it will load and render the parent tile, so the first thing to check is whether it's actually loading the parent tile. Or is it, say, indicating that all tiles are loaded as soon as the z1 tile fails, and stopping there? Sometimes when you figure out why it's not failing, it's something you can fix with a tweak to the test case or the harness. But sometimes it's not, and you have to settle for a gl-js-specific unit test (or if even that's a disproportionate effort, manual testing). |
Actually, the issue here may just be that your layer order is swapped. The background layer should be first. |
I did need to reverse the layer order, but there was also an inconsistency between All other tests pass except for |
The key thing that test case was focusing on was collision detection in the case where symbols are being included from both the overdrawn child and from the parent. The basic approach is to place both tiles but rely on the
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉
Hi guys, just tested this, with tiles generated via tippecanoe which only go until zoom level 14, while I use the map until zoom level 18. After zoom level 15 the tiles aren't rendered anymore. |
@danielfornies you need to se tthe |
Omg, silly me, it was just that, thanks! |
Hello,
If setting maxzoom 7 then mapbox won't request tiles which are available from usa |
@mollymerp Any pointers here please? This prevents me from upgrading mapbox from 0.47 and I'm not really sure how I could tackle this. |
Launch Checklist