Skip to content

Refactor offline maps cache to use SQLite table per layer instead of separate files per tile #29

@EMaksymenko

Description

@EMaksymenko

PR #28 adds some basic offline maps cache support, but it has several drawbacks which should be improved:

  1. Cache availability is controlled by System.getProperty which is not very preferable way for Android.
  2. Basic implementation has a bug - when "worldwind.ImageRetriever.decodeUrlCacheDir" property is not specified, ImageRetriever throws NPE for any downloaded tile. Map sources does not work by default now in develop branch.
  3. Map cache does not support configuration of file type PNG or JPG per layer, which cause not optimal filesystem usage for raster sources like Satellite imagery.
  4. And the most complex and important thing, basic implementation store each tile as file on sdcard which leads to very ineffective "inodes" usage on sdcard filesystem, because tiles are very small files and it can be several millions of them for each layer. Proper way will be using some SQLite based standard like MBTiles to store one DB file with all tiles per layer.
  5. Basic implementation has no possibility to invalidate and clear cache. Tiles should be automatically updated with new version after some period or manually cleared by user.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions