ThinkGeo.com    |     Documentation    |     Premium Support

Thinkgeo 14.2.5 creates entries in the cache for non visible layers

We have 5 layers of different types of mapping:

Vector mapping for street view (MasterMap)
Raster street view
Raster 50k
Raster 250k
Raster Country view

When panning around on any layer files are constantly being created in the other cache folders even though the layer is not visible. Is this a known issue and can it be fixed? It is very wasteful from a performance point of view.

We control the visibility of each layer using the ZoomLevelSet and we don’t have any of the mapping layers overlapping.

That’s because the TileOverlay, as well as its TileCache, by default is using the Global TileMatrixSet, where the entire world fits in a single image as zoom 0, each tile “splits” to 4 images when going to the next level. So your overlay will keep generating the cache as long as it’s within the extent of the Matrix (in this case the entire world). Here is a general idea of the default Tiling System.
image

This case has been taken care of in v14.3. We have a sample below showing you how to set your own TileMatrixSet.
samples/wpf/HowDoISample/Samples/Miscellaneous/CacheTileOverlay.xaml.cs · master · ThinkGeo / Public / Desktop Maps · GitLab

The sample shows the City of Frisco using its bounding box, instead of the default global extent, in its TileMatrixSet. You see the Tile Number is 0-0-0, meaning it’s the zoom0 tile, and TileCache will NOT be generated when you pan out of the area.

And here is the same extent with the default TileMatrixSet (so it’s under zoom 9). In this case, the TileCache will always be generated.

Have a try and let us know if you have any questions.

Thanks,
Ben