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

OfflineManager and MapView should share a singleton DefaultFileSource #4386

Closed
1ec5 opened this issue Mar 18, 2016 · 1 comment
Closed

OfflineManager and MapView should share a singleton DefaultFileSource #4386

1ec5 opened this issue Mar 18, 2016 · 1 comment
Labels
Android Mapbox Maps SDK for Android offline refactor

Comments

@1ec5
Copy link
Contributor

1ec5 commented Mar 18, 2016

As of #4383, all instances of mbgl::DefaultFileSource in the Android SDK are backed by the same file on disk. Per #4362, the singleton OfflineManager and all mbgl::View instances managed by MapViews should ideally share the same instance of mbgl::DefaultFileSource, so that the 20-connection throttle can be applied to the whole process instead of on a map-by-map basis.

In the iOS and OS X SDKs, in #4377, we made the singleton MGLOfflineStorage object responsible for the singleton mbgl::DefaultFileSource instance. Thus MGLMapView depends on MGLOfflineStorage (as ambient caching is just a special case of offline caching), but not the other way around.

/cc @zugaldia @jfirebaugh

@tobrun
Copy link
Member

tobrun commented Mar 1, 2017

This landed as part of #8083

@tobrun tobrun closed this as completed Mar 1, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Android Mapbox Maps SDK for Android offline refactor
Projects
None yet
Development

No branches or pull requests

3 participants