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

Offline Tile Count API #9460

Open
nitrag opened this issue Jul 8, 2017 · 9 comments
Open

Offline Tile Count API #9460

nitrag opened this issue Jul 8, 2017 · 9 comments
Labels
Core The cross-platform C++ core, aka mbgl feature offline

Comments

@nitrag
Copy link
Contributor

nitrag commented Jul 8, 2017

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".

@1ec5
Copy link
Contributor

1ec5 commented Sep 22, 2017

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.

@asheemmamoowala
Copy link
Contributor

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

@jfirebaugh
Copy link
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.

@kkaefer kkaefer added the Core The cross-platform C++ core, aka mbgl label Nov 24, 2017
@stale stale bot added the archived Archived because of inactivity label Nov 2, 2018
@stale
Copy link

stale bot commented Dec 4, 2018

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

@stale stale bot closed this as completed Dec 4, 2018
@riastrad
Copy link
Contributor

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

@riastrad riastrad reopened this Feb 12, 2019
@stale stale bot removed the archived Archived because of inactivity label Feb 12, 2019
@stale stale bot added the archived Archived because of inactivity label Aug 11, 2019
@stale
Copy link

stale bot commented Aug 11, 2019

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

@stale stale bot closed this as completed Aug 11, 2019
@friedbunny friedbunny reopened this Aug 13, 2019
@stale stale bot removed the archived Archived because of inactivity label Aug 13, 2019
@friedbunny
Copy link
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.

@shabnomnom
Copy link

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

@Hartistic
Copy link

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Core The cross-platform C++ core, aka mbgl feature offline
Projects
None yet
Development

No branches or pull requests

9 participants