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.

provide an estimation of total size for offline regions #4258

Closed

Description

@jfirebaugh

Tile sizes are variable, so there is no way to calculate the precise size of an arbitrary offline region other than downloading it and then summing the actual size. However, we can make several types of estimates. In descending order of likely accuracy:

  • Estimates based on the size of tiles already downloaded. We could assume that the remainder of the tiles will be a similar size, and estimate accordingly.
  • Estimates based on average tile sizes for particular sources. For frequently used sources such as mapbox-streets-v7, we can calculate typical tile sizes. To be useful, they would need to have at least zoom-level granularity: an estimated average tile size for each zoom level from 0 to 16. Then we could estimate by multiplying by the number of tiles in the region at each zoom level.
  • A nominal "typical tile size" estimate. Likely broken down at least to: 512px vector tile, 256px raster tile, 512px raster tile, 256px@2x raster tile, 512px@2x raster tile. This would be a fairly inaccurate fallback for unknown sources.

Activity

  1. mb12 commented on Mar 9, 2016

    @mb12

    @jfirebaugh Why can't you do it on the server side?

  2. jfirebaugh commented on Mar 9, 2016

    @jfirebaugh
    ContributorAuthor

    You might be under the impression that offline is implemented by requesting some sort of single archive from the server. That isn't the case: an offline "download" is just a bunch of individual requests for each of the required resources. The server doesn't have any special knowledge of the offline region as a whole which it could use to calculate the total size. Among other benefits, this means that offline features aren't limited to Mapbox APIs. A server side implementation that was able to calculate a total size would either be proprietary, or require some sort of open protocol specification.

  3. mb12 commented on Mar 9, 2016

    @mb12

    @jfirebaugh Without server side support, how do you compute what code points to download for a font set?

  4. jfirebaugh commented on Mar 9, 2016

    @jfirebaugh
    ContributorAuthor

    We download them all: #4069.

  5. added
    Core
    on May 30, 2017
  6. daniel-choi commented on Jan 19, 2018

    @daniel-choi

    Hi all! Any updates on this issue or #9460?

  7. stale commented on Oct 28, 2018

    @stale

    This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

  8. added
    archived
    on Oct 28, 2018
  9. stale commented on Dec 6, 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.

  10. removed
    archived
    on Dec 6, 2018
  11. added
    archived
    on Jun 4, 2019
  12. stale commented on Jun 4, 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.

  13. Hartistic commented on Sep 28, 2021

    @Hartistic

    This should be reopened, there is a huge use case for this and Mapbox could provide an easier way to estimate the file size.

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

    Corearchivedfeatureoffline

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions