Skip to content
This repository was archived by the owner on Aug 25, 2023. It is now read-only.
This repository was archived by the owner on Aug 25, 2023. It is now read-only.

Discuss download manager for offline caching #66

Closed

Description

Should we implement a download manager which automates the process of caching all the tiles within a bounding box? How would that work? Would it be enough if the only API calls are "cache all the tiles in {MKCoordinateRegion} for {mapID}" and "clear the cache for {mapID}", or does it need to support multiple separate, and possibly overlapping, regions in order to be useful? The first case seems pretty reasonable, but the second one might take a lot of work.

For some context, see MBXCacheManager from issue #61 (the code is here).

/cc @radven @kontextbewusst

Activity

  1. ghost added this to the 0.3.0 milestone on Mar 5, 2014
  2. radven commented on Mar 5, 2014

    @radven

    I like this idea.

    One complicating thought though would be how to handle updating a cached map if the update doesn't complete before a network connection is lost. It would be bad to have a mix of old and new tiles in the cache, and you wouldn't want to clear the cache and risk having no tiles present either.

    I'd love an atomic update capability that would download all the map tiles in a region to a certain depth, and only if the download fully succeeds then clear the cache and replace it with the new data.

    The usage scenarios I have in mind are for apps that are used primarily offline or with very marginal net connectivity, and it is important to never break functionality if a user tries to update her maps and the connection fails or never finishes.

    My current plan is to embed a starting map inside the apps via MBTiles, and I've been puzzling over how to allow for OTA updates without requiring a full new version of the app to be released. This might be a way.

  3. radven commented on Mar 5, 2014

    @radven

    I think only a single region would be fine - I'm trying to imagine cases it wouldn't be.

  4. incanus commented on Mar 7, 2014

    @incanus
    Contributor

    does it need to support multiple separate, and possibly overlapping, regions in order to be useful

    I would say no. The SDK has had the single region capability for a couple years and I've never heard of someone needing particular distinct regions within it (on a per-mapID basis, anyway).

  5. ghost closed this as completedon Mar 20, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions