This object is in archive! 

Some tiles won't load after zoom in

Dmitri shared this problem 9 years ago
Solved

Some random tiles won't load/draw after zoom in or pinch in to the next

level. They stay empty until the map is moved, taking lacking tiles out

of the screen edge and back. Occurs for both online and offline maps!

HTC M8

Android 4.4.4, Sense 6.0

Replies (10)

photo
1

Note: with overlays, it happens much more often/likely and is better reproducable. But it happens without overlays as well.

photo
2

Hi myneur, thanks for report. I've merged your issue with this, already existing.


I'm aware of this issue for a .. well, quite a long time. Anyway because it happen really rare, I wasn't yet able to find out real reason why this happen. Anyway issue is in my mind and just waits for correct moment :). Fortunately zoom in/out or move of map fix this annoying issue. Sorry for that

photo
1

I also wanted to second that it does this everytime when I use an

overlay. I have noticed that it will always load the colored tiles in my

overlay (mbtiles), but the transparent tiles in the overlay are where

the map does not load.

The green shaded areas in the attached pics are from my overlay for reference.

photo
1

I found a work around for anyone having this same issue when using overlays. I am using mbtiles, but it may work with other formats as well.

You can add a boundary polygon around your area and add a 99.99% transparent white fill. This will force Locus to generate a tile that will load in those areas. The white fill is not even noticeable.

If you are using Tilemill, add these lines to a boundary polygon:

polygon-fill:#fff;

polygon-opacity:0.01;

photo
1

Hi Peter,

are able to share any problematic map? Additional information would be also helpful:

- format of map (*.sqlitedb, *.tar, ?)

- Path to the folder where are located the problematic maps.

- Are all problematic maps located in the same folder?


Thank you

Regards Petr

photo
1

Both maps (Kosice, Arco) are available at https://drive.google.com/folderview?id=0B0nIBPG_hX51V0k2V1lUd1BGNjQ&usp=sharing (but i this happens with all 4 of my offline maps).


Biggest

map - Kosice - exhibits first reported refresh failure (only at zoom

level 16 - only when panning, possible to erase completely), remaining

3 smaller maps only miss area corners - some parts around corners are refreshed when

panning in/out, some parts stay unpainted, never possible to erase

completely. Usually the unpainted areas stay unpainted after zoom

in/out.


Path: /storage/emulated/0/Locus/maps


Yes - all 4 maps in the same folder.


PS: Reply to email returns "Technical details of permanent failure:


Google tried to deliver your message, but it was rejected by the server for the recipient domain asamm.com by aspmx.l.google.com."

photo
1

Hello Peter,

The corner/border areas.

That is how Locus works. Let me explain the steps how tiles are shown:

- When you zoom-in Locus quickly re-scale the tile from previous level and show it until data for new level are loaded from map file

- In case that tile for new level exists mentioned re-scaled tiles are replaced with loaded tiles for new level

- In case that tile for new level does not exist, only re-scaled tile remains on screen

- but the re-scaled tiles are removed from map if you pan with map out of the screen (because the memory). Tile is out of view so it's needed to render it

- and finally if you pan with map back then Locus show only tiles that exists for specified level


Kosice

Issue is caused due to same reason. The data for level=16 are available only in area of Kosice city. If you zoom-in into level 16 in city area everything works fine. But Locus is not able load any data for level=16 when you zoom-in everywhere outside the city area. The result is the same. In first step is tile from level 15 re-scaled. But as you pan with map the re-scaled tile is removed because there are no data for level 16

So it's not bug but I can understand that such behavior is quite tricky


Thanks for understanding

Petr

photo
1

Hi,


Your algorithm makes complete sense - but there are conditions when some part of it fail:


1) non Kosice - if i only zoom in to get some parts out of the view, then zoom out, it reloads missing tiles from the map. So far so good. But some tiles are not redrawn and stay empty (the corner ones). Additional zoom out/zoom in sometimes fixes that, bot not reliably. This is clearly a bug (now i noticed that sometimes they are redrawn after really long time - like a minute, but sometimes they stay empty even after 5m). Looks like some synchronization issue between thread loading from map and drawing thread.


2) Kosice - I understand current algorithm is not designed to be reliable for mixed map levels, but lets call it the defect in the design - as clearly the result is that i cannot use the offline map without irritation.

Offline maps is the main reason for buying Pro version, so i hope we agree that this basic functionality should work.

Would it be difficult to add scale operation for tiles which need to be redrawn but are missing in the current level?

I believe this already is implemented - as for Kosice center, when zoomed at 200m, it already has to load+scale the tiles which are out of the view.


3) I noticed a new defect now (possibly related to the non-Kosice problem). When zooming in and out in Kosice, Cca after 1 out of 10 redraws one tile is not redrawn - but it is in the middle (see attachment). If i zoom in (higher level drawn ok) and back out, the empty tile is still there. There is clearly some condition when app thinks it has redrawn the tile but the data has not been rendered.


4) Another weird behavior noticed - The app got into some weird state. Kosice map did not allow me to zoom in above level 12. When i turned the map off, and then back on, i still had completely blank map. When i switched to different maps, i still saw nothing (and yes, i centered on the new map). Killing and starting app fixed that at least.

photo
1

Hello Peter,

all issues you've mentioned, are very tricky. I've tried to simulate your issue but without success.

However I'll join this topic with another one

and try to contact the main developer but without simulation it's complicated for us to solve it.


Maybe short comment to your second point: in such situation should locus:

- load tile in current level (due to missing data it fails)

- then look for tiles in upper levels and try to search corresponding tile. And there is question: what to do if upper level also do not contain the data? Where is the limit for searching?

- in case that upper level has data then you need to split the tile (you need 4 tiles in level=16 to cover the same are as one tile from level=15)

I only wanted to point out that there is lot's steps that has to be performed to load or find proper tiles. Your example with center of Kosice is different situation. Locus knows that there isn't level=17 and simple rescale whole 16 level. There isn't any reverse searching


Honestly I understand you but it's not easy to find appropriate solution

Thanks for understadning

photo
1

I understand it is tricky and could take time, but hopefully we can do small steps to get further to understanding the root cause. Can you at least confirm there are 2 threads, one loading the map and the other one doing the drawing? Maybe one way to work around the issue is to have a flag for each tile that it is not present in the map. If you can distinguish not present from not drawn than you could detect missed draw and redraw only those tiles.


Ad 2) Program should check all levels. It might take longer but it should show draw a map every time (unless it is not covered at all). To speed up lookup, maybe you could add some index for every zoom level to quickly check which tiles are present. But some delay would be better than empty map. In case it could take more than 5s, you can show some hourglass icon or similar visual hint that the load is running in the background.


For Kosice, imagine you zoom to 200m (L16 scaled 2x). When you pan and only 1 column of tiles need to be redrawm, you still need to load tile in L16 and scale it. How is it different?

Loading and rescaling must be the same, the only difference is finding that load+rescale needs to be done. Technically when downloading offline map, i could have decided to download for Kosice center only L4+L16, so L15 in Kosice center would be the same as L16 outside now.


I understand the solution might not be trivial - but is rather important to find one. But given what the program already does, i believe most of the pieces are already in place.

photo
1

Hello Peter,

I'll try to answer to your post. It is now more task for me as a main Android developer of Locus then on Petr.

No matter if your suggestion is logical or not, I may absolutely agree that Locus rendering system needs improvements. There is more then this issue, like random missing tiles, weird merging of layers in rare cases and few more.

Mobile market grows really fast and also a power of devices. Few years ago, there was very limited amount of memory so I did into Locus huge amount of various optimization methods that reduce required amount of memory (some method to share same tile between map etc.). Thanks to this, whole rendering algorithm is quite complex and hard to debug. And also thanks to this, I'm little bit worry to dig too deep into this because for now "it works". Not perfectly, but works. And it may take (expectation) up to 2 weeks to remove some old, not anymore needed code, simplify whole system and then do some improvements like you suggest.

So my whole life story in previous paragraph is attempt to excuse wrongly wrote old code of Locus rendering system and my lack of time on this task.

Hope you will understand and also that you excuse these problems for now. I'm kind of guy who do not like if something do not work as expected. On second side, we have now some more important priorities, so this task will have to wait a little.

Sorry to say it and thanks for understanding.

photo
1

Hi. I understand it is not easy and it will take time (btw - may i ask what the top priorities are?).


I would still have one question which could maybe provide the workaround for me. Interesting thing is - that panning of scaled map in level 16 (zoom 200m and less) works nicely - actually it works much faster than redrawing scaled level 15 - as if the whole area with level 16 was cached. Is that hardcoded in the code or how is this solved?

Would it help if i removed level 16 from my map (actually i like it less than scaled level 15)?

photo
1

This issue for me appears to be fixed in the latest version (actually maybe a version or two back). I no longer have to add a transparent fill as mentioned in my previous comment for my Locus overlay maps.

photo
1

Hello Bradon,


thank you for an information. I'm little bit surprised, because as I remember, there were no direct changes that should affect this. Anyway if it works - perfect :).

photo
1

You are right - the issue is not fixed. Still same caching artefact as before. Wouldnt there be a way to force redraw of all tiles?

Replies have been locked on this page!