summaryrefslogtreecommitdiff
path: root/src/mbgl/map
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2015-10-29 12:00:59 -0700
committerJohn Firebaugh <john.firebaugh@gmail.com>2015-10-30 11:17:01 -0700
commit7669e02062ccab9e3d908a9eab04f5d13a7b89c0 (patch)
treeeab604fd472aaa923eb503239a3eadcadaaae40f /src/mbgl/map
parentf745f271e3ad4a969d98083b658a905f43e3dcd3 (diff)
downloadqtlocation-mapboxgl-7669e02062ccab9e3d908a9eab04f5d13a7b89c0.tar.gz
[core] Monitor annotation tiles, rather than completely invalidating them
Fixes #1688
Diffstat (limited to 'src/mbgl/map')
-rw-r--r--src/mbgl/map/geometry_tile.hpp5
-rw-r--r--src/mbgl/map/source.cpp7
-rw-r--r--src/mbgl/map/source.hpp2
3 files changed, 5 insertions, 9 deletions
diff --git a/src/mbgl/map/geometry_tile.hpp b/src/mbgl/map/geometry_tile.hpp
index 242476da64..93312bcf48 100644
--- a/src/mbgl/map/geometry_tile.hpp
+++ b/src/mbgl/map/geometry_tile.hpp
@@ -27,6 +27,7 @@ typedef std::vector<std::vector<Coordinate>> GeometryCollection;
class GeometryTileFeature : private util::noncopyable {
public:
+ virtual ~GeometryTileFeature() = default;
virtual FeatureType getType() const = 0;
virtual mapbox::util::optional<Value> getValue(const std::string& key) const = 0;
virtual GeometryCollection getGeometries() const = 0;
@@ -34,12 +35,14 @@ public:
class GeometryTileLayer : private util::noncopyable {
public:
+ virtual ~GeometryTileLayer() = default;
virtual std::size_t featureCount() const = 0;
virtual util::ptr<const GeometryTileFeature> getFeature(std::size_t) const = 0;
};
class GeometryTile : private util::noncopyable {
public:
+ virtual ~GeometryTile() = default;
virtual util::ptr<GeometryTileLayer> getLayer(const std::string&) const = 0;
};
@@ -47,6 +50,8 @@ class Request;
class GeometryTileMonitor : private util::noncopyable {
public:
+ virtual ~GeometryTileMonitor() = default;
+
/*
* Monitor the tile held by this object for changes. When the tile is loaded for the first time,
* or updates, the callback is executed. If an error occurs, the first parameter will be set.
diff --git a/src/mbgl/map/source.cpp b/src/mbgl/map/source.cpp
index 3cd73734fd..9a916537aa 100644
--- a/src/mbgl/map/source.cpp
+++ b/src/mbgl/map/source.cpp
@@ -526,13 +526,6 @@ bool Source::update(MapData& data,
return allTilesUpdated;
}
-void Source::invalidateTiles() {
- cache.clear();
- tiles.clear();
- tile_data.clear();
- updateTilePtrs();
-}
-
void Source::updateTilePtrs() {
tilePtrs.clear();
for (const auto& pair : tiles) {
diff --git a/src/mbgl/map/source.hpp b/src/mbgl/map/source.hpp
index 4aab4a8b44..9120bbfa78 100644
--- a/src/mbgl/map/source.hpp
+++ b/src/mbgl/map/source.hpp
@@ -78,8 +78,6 @@ public:
TexturePool&,
bool shouldReparsePartialTiles);
- void invalidateTiles();
-
void updateMatrices(const mat4 &projMatrix, const TransformState &transform);
void drawClippingMasks(Painter &painter);
void finishRender(Painter &painter);