1 (edited by hanni78 2021-12-06 19:16:36)

Topic: Prevent loading error tiles at high zoom levels

I'm trying to prevent the user from seeing error tiles when zooming in too far. Tiles may be missing at certain zoom levels depending on where in the world you zoom in.

The user will see tiles that say "Data not available" or similar.
Is it possible to not load those tiles, and zoom in digitally instead?

This is kind of almost already implemented: If I'm at zoom level 15, and then I turn off my internet. Then I zoom in, and Online Maps will then just zoom into the already loaded tiles, creating big pixels. This is what I want for unavailable tiles.

Is this possible?

Re: Prevent loading error tiles at high zoom levels

Hello.

Yes it is possible.
Here is an example of how to implement this for ArcGIS:
https://infinity-code.com/atlas/online- … STile.html
If you are using some other source of tiles, you will need to change the validation rules in OnTileLoaded method.

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.

Re: Prevent loading error tiles at high zoom levels

Hi, thank you Alex it works pretty great! The only use case it doesn't handle is when you start at zoom level 19 when app starts.

Is there a way to force it to try and load other zoom levels until it finds one that doesn't return an error, and apply that texture?

Thanks

Re: Prevent loading error tiles at high zoom levels

By default, Online Maps tries to load 5 parent levels.
You can increase this value in Online Maps / Advanced / Count Parent Levels.

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.

Re: Prevent loading error tiles at high zoom levels

Hi, this works and was really easy to change! At least with a Tileset Control. With a Texture Control it doesn't seem to work.
I don't mind migrating completely to Tileset mode though. But I still need to render the tileset to a RenderTexture in the end, as it is supposed to be displayed on a mesh.

Also it does use a little bit more network data and CPU time than I would have hoped.
The use-case for this particular map is just displaying a location that has been chosen by the user earlier. So there will be no interaction on this map.

The best solution would have been if it just tried to download a tile at level 19, and if that failed, try one at level 18 etc, until the tile is successful, and then download the other tiles at that level.