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

Offline Tile Count API #9460

Open
Open

Description

@nitrag

Since there is a limit the offline tiles to 6000 per user I need two methods:

  • How many tiles in a given MGLCoordinateBounds
  • How many tiles are currently saved on the device (so I can calculate remaining available)

This way I can appropriately inform user if their MGLCoordinateBounds is going to successfully download or not. AKA "Choose a smaller area, zoom size, or go delete your other offline packs to make room".

Activity

  1. 1ec5 commented on Sep 22, 2017

    @1ec5
    Contributor

    How many tiles in a given MGLCoordinateBounds

    This tool estimates the number of tiles needed for an arbitrary tile pyramid, but it hasn’t been ported to the SDKs themselves, since the actual number of tiles would depend on various factors, such as how many tiles could be reused from another downloaded pack. #4258 has some ideas for a more rigorous estimate.

    How many tiles are currently saved on the device (so I can calculate remaining available)

    You can obtain the pack’s progress and count its downloaded tiles.

  2. asheemmamoowala commented on Sep 27, 2017

    @asheemmamoowala
    Contributor

    With #9906, we should be able to implement: +[MGLOfflineStorage tileCountForRegion:] or something similar.

  3. jfirebaugh commented on Sep 27, 2017

    @jfirebaugh
    Contributor

    Note that the tile count depends on the minzoom and maxzoom specified in the source's TileJSON, so calculating it depends on having downloaded at least that resource.

  4. added
    Core
    on Nov 24, 2017
  5. added
    archived
    on Nov 2, 2018
  6. stale commented on Dec 4, 2018

    @stale

    This issue has been automatically detected as stale because it has not had recent activity and will be archived. Thank you for your contributions.

  7. riastrad commented on Feb 12, 2019

    @riastrad
    Contributor

    This is still a fairly popular feature request, any objections to reopening?

  8. removed
    archived
    on Feb 12, 2019
  9. added
    archived
    on Aug 11, 2019
  10. stale commented on Aug 11, 2019

    @stale

    This issue has been automatically detected as stale because it has not had recent activity and will be archived. Thank you for your contributions.

  11. removed
    archived
    on Aug 13, 2019
  12. friedbunny commented on Aug 13, 2019

    @friedbunny
    Contributor

    Whenever this issue is closed, its status on project boards automatically moves to “Resolved”... but when it’s inevitably reopened, it stays as “Resolved”. Not sure who owns those project board(s), but this seems like a flaw in the stalebot/project board relationship.

  13. shabnomnom commented on Jan 11, 2020

    @shabnomnom

    Hi, this feature is requested recently again by our customer. Is there any plan to further develop or invest in this feature?

  14. Hartistic commented on Sep 28, 2021

    @Hartistic

    I agree this feature is a must for us too. We're getting crashes and have to "hack" our way into downloading a pack, suspending it, and then deleting it to approximate the size of the region the user wants to save. There is a huge need for this and it seems to be getting ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Corefeatureoffline

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions