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

Provide a way to disable network activity for maps #7443

Open
jmkiley opened this issue Dec 15, 2016 · 12 comments
Open

Provide a way to disable network activity for maps #7443

jmkiley opened this issue Dec 15, 2016 · 12 comments
Labels
feature gl-ios iOS Mapbox Maps SDK for iOS offline

Comments

@jmkiley
Copy link
Contributor

jmkiley commented Dec 15, 2016

Currently, offline maps are updated whenever device detects a network connection. The user would need to disable this using their platform's connectivity monitoring API if they would like to prevent users from downloading offline maps over a cellular connection.

Would it be possible to let the user to choose whether they want to allow offline maps to update while the end user is connected to cellular?

cc @friedbunny

@jmkiley jmkiley added feature iOS Mapbox Maps SDK for iOS offline labels Dec 15, 2016
@jfirebaugh
Copy link
Contributor

jfirebaugh commented Dec 15, 2016

Note that "updated" here means the following: when connectivity is available, resources (principally tiles) which are needed to render visible regions of the map are checked for freshness according to the schedule defined by caching headers on the most recently stored response. There's no "en masse" update of whole offline regions -- only the resources that are actually used are updated.

@barnaclebarnes
Copy link

+1 for this. I want to be able to 'lock' the offline map so that it doesn't create any network traffic when viewing the offline map. Even if the user scrolls outside the viewable area it shouldn't try and download more data. That defeats the purpose of an offline map. This is especially critical with tourism apps where users may be on a very limited/expensive data plan while roaming.

@boundsj
Copy link
Contributor

boundsj commented Feb 28, 2017

Noting that #8125 proposes a way to turn off file / network activity in the SDK. That PR intends to use the (private to the Mapbox SDK) feature to automatically disable network and file system activity when the host app is running in the background. However, something like this could be used by the application developer to disable activity as a response to connectivity changes (or any other reason) if it were exposed publicly.

@jfirebaugh
Copy link
Contributor

As written, the pause/resume mechanism is not a good fit for this use case though, because it disables loading any resources, including those that can be satisfied by the offline database.

@robmaceachern
Copy link

@jfirebaugh is there any solution for the use case mentioned by @barnaclebarnes?

We also need a way to allow users to download maps offline and then disable all (or virtually all) mapping network traffic to avoid unnecessary data charges for users.

It'd be great if a delegate method was exposed to enable control over when network requests were attempted.

@barnaclebarnes
Copy link

@robmaceachern We haven't found one yet. This is still stopping us moving 100% too Mapbox maps unfortunately.

@jfirebaugh jfirebaugh changed the title Updating offline maps on cellular Provide a way to disable network activity for maps Mar 13, 2018
@jfirebaugh
Copy link
Contributor

The use case described by @barnaclebarnes is what this feature request is tracking. I've updated the title to make that clearer.

@stale
Copy link

stale bot commented Oct 27, 2018

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.

@stale stale bot added the archived Archived because of inactivity label Oct 27, 2018
@barnaclebarnes
Copy link

This issue is still live. AFAIK there is still no way to have offline maps that don't try and access the network. /c @jfirebaugh

@stale stale bot removed the archived Archived because of inactivity label Oct 27, 2018
@bwandersOA
Copy link

+1 for this issue. Impacts user's battery life and data usage without a method to disable network requests for updated/additional tiles

@pimnijman
Copy link

Any updates on this? Users are reporting large downloads while using "offline" maps, so I'm looking for a way to prevent downloading tiles in certain cases.

@friedbunny
Copy link
Contributor

There’s an open pull request that would add this over in #15650.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature gl-ios iOS Mapbox Maps SDK for iOS offline
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants