summaryrefslogtreecommitdiff
path: root/src/mbgl/annotation
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2016-08-26 13:11:33 -0700
committerJohn Firebaugh <john.firebaugh@gmail.com>2016-09-06 12:52:13 -0700
commit21dc12ee93e890325c61daa0e4183dd1e795f0a9 (patch)
tree4c8cb22c5f5f7613dbb5126c481e3086b0d048a3 /src/mbgl/annotation
parent5b8d90bf0073c29790e9acaaf12471296de054ff (diff)
downloadqtlocation-mapboxgl-21dc12ee93e890325c61daa0e4183dd1e795f0a9.tar.gz
[core] Ensure that TileWorker can retain tileData after layout
Diffstat (limited to 'src/mbgl/annotation')
-rw-r--r--src/mbgl/annotation/annotation_tile.cpp4
-rw-r--r--src/mbgl/annotation/annotation_tile.hpp1
2 files changed, 5 insertions, 0 deletions
diff --git a/src/mbgl/annotation/annotation_tile.cpp b/src/mbgl/annotation/annotation_tile.cpp
index 6b225ce20b..c9ad9b5214 100644
--- a/src/mbgl/annotation/annotation_tile.cpp
+++ b/src/mbgl/annotation/annotation_tile.cpp
@@ -40,6 +40,10 @@ optional<Value> AnnotationTileFeature::getValue(const std::string& key) const {
AnnotationTileLayer::AnnotationTileLayer(std::string name_)
: name(std::move(name_)) {}
+std::unique_ptr<GeometryTileData> AnnotationTileData::clone() const {
+ return std::make_unique<AnnotationTileData>(*this);
+}
+
const GeometryTileLayer* AnnotationTileData::getLayer(const std::string& name) const {
auto it = layers.find(name);
if (it != layers.end()) {
diff --git a/src/mbgl/annotation/annotation_tile.hpp b/src/mbgl/annotation/annotation_tile.hpp
index 19a731ee7b..d43ec82d38 100644
--- a/src/mbgl/annotation/annotation_tile.hpp
+++ b/src/mbgl/annotation/annotation_tile.hpp
@@ -56,6 +56,7 @@ private:
class AnnotationTileData : public GeometryTileData {
public:
+ std::unique_ptr<GeometryTileData> clone() const override;
const GeometryTileLayer* getLayer(const std::string&) const override;
std::unordered_map<std::string, AnnotationTileLayer> layers;