Grey Tiles Appear Upon Zoom

508
1
06-25-2019 06:20 AM
BlakeEdwards
New Contributor II

Hello,

I have been working on an Android application that renders a map and allows users to pinch and press a button to zoom into their location on the map. However, when going past a certain scale (zoom) and then panning around the map, the automatic rendering of tiles stops. After debugging all the way down through the library I have found that all of the correct native rendering methods are being called. However, the tiles of interest (surrounding the point where I zoom in) are not being rendered.

At lower levels of the library, weak references are used quite a bit. Could the cause of this bug be that surrounding tiles are being garbage collected when they go out of view because there is no longer a direct reference to them for rendering? 

Could it be that because there is no more tiles to render at the max zoom level that the library stops rendering them? Is there any way to override this functionality and keep the lowest level tiles rendering at the point where I am zoomed in?

If none of the above can be answered at this time, can anyone describe how tiled maps (.tpk) are consumed by the library to be rendered on the screen? 

I appreciate all that take the time to help me solve this development issue that has stopped my team in its tracks for a significant amount of time. 

Thank you,

Blake Edwards

0 Kudos
1 Reply
GuntherHeppner
Esri Contributor

Hi Blake,

You can control the "NoDataTileBehaviour" on your layer:
https://developers.arcgis.com/android/latest/api-reference/reference/com/esri/arcgisruntime/layers/I...

Once the layer has loaded, check what its NoDataTileBehaviour is, by calling getNoDataTileBehaviour().

You could set this value to "NoDataTileBehaviour.SHOW" which will stamp "No Data" on each tile where there is no data. That's a good way to debug, where your TileCache has data and where not. If you want to show tile data from a higher level for "no data" areas, you can set "NoDataTileBehaviour.UPSAMPLE".

Gunther

0 Kudos