diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2015-10-28 14:51:16 -0700 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2015-10-29 12:05:40 -0700 |
commit | e2dc956eb63b8bd2582d2e666b412bf00ba92623 (patch) | |
tree | 8d02589041793e63a07dc827a4df0f092a3b8dea /src/mbgl/annotation/annotation_tile.cpp | |
parent | 978da4224e20c01efb01efe95bbfe51a45c6087d (diff) | |
download | qtlocation-mapboxgl-e2dc956eb63b8bd2582d2e666b412bf00ba92623.tar.gz |
[core] Merge LiveTileData into VectorTileData
To encapsulate the differences, this introduces an abstract
GeometryTileMonitor class, with concrete VectorTileMonitor and
AnnotationTileMonitor implementations, and makes pbf parsing for
VectorTile data happen lazily in getLayer, since we want that to
happen on the worker thread, rather than when VectorTile is created.
Fixes #2792
Diffstat (limited to 'src/mbgl/annotation/annotation_tile.cpp')
-rw-r--r-- | src/mbgl/annotation/annotation_tile.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mbgl/annotation/annotation_tile.cpp b/src/mbgl/annotation/annotation_tile.cpp index 71a6870cdb..81f7662b48 100644 --- a/src/mbgl/annotation/annotation_tile.cpp +++ b/src/mbgl/annotation/annotation_tile.cpp @@ -1,5 +1,6 @@ #include <mbgl/annotation/annotation_tile.hpp> #include <mbgl/util/constants.hpp> +#include <mbgl/map/map_data.hpp> namespace mbgl { @@ -25,4 +26,13 @@ util::ptr<GeometryTileLayer> AnnotationTile::getLayer(const std::string& name) c return nullptr; } +AnnotationTileMonitor::AnnotationTileMonitor(const TileID& id, MapData& data) + : tile(data.getAnnotationManager()->getTile(id)) { +} + +Request* AnnotationTileMonitor::monitorTile(std::function<void (std::exception_ptr, std::unique_ptr<GeometryTile>)> callback) { + callback(nullptr, std::move(tile)); + return nullptr; +} + } |