summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJustin R. Miller <incanus@codesorcery.net>2015-04-16 01:15:41 -0700
committerJustin R. Miller <incanus@codesorcery.net>2015-04-16 01:15:41 -0700
commit190709c6b1fd9326d0eef5ffc8eb36070e5ad5c7 (patch)
treedbff7b348f78d0481bf76d3c3313f3e5514cb7b6 /include
parentc574acd64da34ea8bbd58ef5440c6add8f365e24 (diff)
downloadqtlocation-mapboxgl-190709c6b1fd9326d0eef5ffc8eb36070e5ad5c7.tar.gz
fixes #1157, #1255: cache parsed tiles in memory
Diffstat (limited to 'include')
-rw-r--r--include/mbgl/ios/MGLMapView.h3
-rw-r--r--include/mbgl/map/map.hpp7
2 files changed, 10 insertions, 0 deletions
diff --git a/include/mbgl/ios/MGLMapView.h b/include/mbgl/ios/MGLMapView.h
index f2aef61830..8717b5e8a1 100644
--- a/include/mbgl/ios/MGLMapView.h
+++ b/include/mbgl/ios/MGLMapView.h
@@ -279,6 +279,9 @@ IB_DESIGNABLE
/** Toggle the current value of debugActive. */
- (void)toggleDebug;
+/** Empties the in-memory tile cache. */
+- (void)emptyMemoryCache;
+
/** Resets the map to the minimum zoom level, a center coordinate of (0, 0), and a northern heading. */
- (void)resetPosition;
diff --git a/include/mbgl/map/map.hpp b/include/mbgl/map/map.hpp
index 38a37a8057..8c7f5f3961 100644
--- a/include/mbgl/map/map.hpp
+++ b/include/mbgl/map/map.hpp
@@ -152,6 +152,11 @@ public:
std::vector<uint32_t> getAnnotationsInBounds(const LatLngBounds&);
LatLngBounds getBoundsForAnnotations(const std::vector<uint32_t>&);
+ // Memory
+ void setSourceTileCacheSize(size_t);
+ size_t getSourceTileCacheSize() const { return sourceCacheSize; }
+ void onLowMemory();
+
// Debug
void setDebug(bool value);
void toggleDebug();
@@ -196,6 +201,8 @@ private:
void updateAnnotationTiles(const std::vector<TileID>&);
+ size_t sourceCacheSize;
+
enum class Mode : uint8_t {
None, // we're not doing any processing
Continuous, // continually updating map