geo-three
geo-three copied to clipboard
White tiles...
First of all: Thanks for a great project!
Second:
Please see screenshot below. Occasionally my custom handler wants to load tiles that are invalid.
I think this might be the reason for the white region seen. Can anyone point me in the right direction for a fix?
This is my Provider code(copied from this project).
export class OurOpenStreetMapsProvider extends GEOTHREE.MapProvider
{
constructor(address) {super();}
fetchTile(zoom, x, y)
{
return new Promise((resolve, reject) =>
{
var image = document.createElement("img");
image.onload = function(){resolve(image);};
image.onerror = function(){reject();};
image.crossOrigin = "anonymous";
//image.src = "https://tile.openstreetmap.org/10/546/321.png";
//image.src = "https://tile.openstreetmap.org/" + zoom + "/" + x + "/" + y + ".png";
image.src = mapserver + zoom + "/" + x + "/" + y + ".png";
});
}
}
This is one of the wrong tile urls:
https://tile.openstreetmap.org/20/560839/328106.png
According to https://stackoverflow.com/a/34003577 that server only provides until zoom level 19.
You can also see this when looking at URLs:
- https://tile.openstreetmap.org/18/0/0.png works
- https://tile.openstreetmap.org/19/0/0.png works
- https://tile.openstreetmap.org/20/0/0.png missing
- https://tile.openstreetmap.org/21/0/0.png missing
Hi Jannik - thanks for your reply.
This explains the invalid requests. I have now changed my mapprovider settings:
- mapprovider.maxZoom = 20;
+ mapprovider.maxZoom = 19;
...and it no longer calls the invalid urls on the map server....however I still get the white squares on my map :-( - does anyone know what I can do to fix that?
Here is an example video of the problem:
https://user-images.githubusercontent.com/2726762/159252064-15cbc230-8404-441e-bada-0a49d2cfcd60.mp4
Hello
Thanks a lot, indeed the problem is related with the zoom levels provided by the openstreetmaps API.
The provider object can be changed to adress this issue by setting the default max level to 19.
The white tiles seem to be related either with a texture upload problem or API response missing. Do you have any warning on the console for these?
Thanks a lot
No warnings in the console other than these from the initial load of the page - but I believe these are irrelevant:
DevTools failed to load source map: Could not load content for http://localhost:8888/static/vis-timeline-graph2d.min.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load source map: Could not load content for http://localhost:8888/static/geo-three/build/geo-three.module.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load source map: Could not load content for http://localhost:8888/static/three.js/3d/jsm/libs/dat.gui.module.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
No additional console output at all when the white tiles appear during my speedy zoom-in/zoom-out.
Here is a screenshot from the live demo where i have selected openstreetmap twice in the top right corner.
I have decided to change the title of the issue, since this issue is present regardless of the mapprovider and the zoom levels.
Since I am at a loss trying to figure out why, here's another screenshot using the default bing maps.
Hoping to see a fix (event though I think the current state of this project is awesome).
same problem, and there is no error in network requests
So after some diging i think that i have a solution for this issue.
This is related with texture loading, aparently we have a race condition in the texture usage before load.
I will publish a new package soon on npm so that you can check if it fixes the issue on you side as well.
Thanks a lot!
@markbaumgarten A new version has been published on npm. (0.0.17)
Please test with the new version to check if the bug war fixed!
Thanks a lot once again!
Nice to see that you are looking into things. It is very much appreciated!
I have replaced the build with the latest version and it seems to still be an issue. Also visible in the live demo version...:
same problem on my end. Any updates on this?
I have found that spinning up my own openstreetmap server helps (did not see any white tiles yet).....
On Mon, Nov 7, 2022, 12:06 laraduarte @.***> wrote:
same problem on my end. Any updates on this?
— Reply to this email directly, view it on GitHub https://github.com/tentone/geo-three/issues/31#issuecomment-1305444596, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAUZW2TJAHHBOGEGEQHJRX3WHDPDDANCNFSM5RELRKIQ . You are receiving this because you were mentioned.Message ID: @.***>
@markbaumgarten on that case the issue could be the amount of requests we're doing. Most servers/services limit the amount of requests we can do per second. I will investigate this a little bit more. Maybe adjusting the zoom speed will make the issue go away. Let's see :)
So I did an extreme test :D a debug layer on top of Bing layer and it confirmed my suspicion, the bing layer is not requesting the white tiles. I should have log 'loadTexture 13 4095 4093' twice on the console but only the OffscreenCanvas (debug layer) is there!
Any ideas @tentone?
Thanks a lot!
new discovery @tentone, powerDistance instead of scaleDistance fixes the issue! The new issue is the size of the texts on the map :D, they are a little bit smaller now! What can I do to have the text a little bit bigger?
Thanks a lot
So I did an extreme test :D a debug layer on top of Bing layer and it confirmed my suspicion, the bing layer is not requesting the white tiles.
I can confirm i have done some testing before and this problem is not related with the tile requests they seem to be working correctly.
I believe the problem is related to texture upload. But still need to perform additional testing to be sure.