summaryrefslogtreecommitdiff
path: root/src/mbgl/tile/vector_tile_data.hpp
diff options
context:
space:
mode:
authorAnsis Brammanis <brammanis@gmail.com>2016-04-05 16:27:37 -0700
committerJohn Firebaugh <john.firebaugh@gmail.com>2016-04-29 12:00:24 -0700
commit61d14089e0dd742719328fd74c693bcae6274a4b (patch)
treee47265a472fe75c635a22815ddc4a0c3fa1dbf84 /src/mbgl/tile/vector_tile_data.hpp
parent25442a77be75001665771097d8978b1191e403d9 (diff)
downloadqtlocation-mapboxgl-61d14089e0dd742719328fd74c693bcae6274a4b.tar.gz
[core] implement queryRenderedFeatures
Diffstat (limited to 'src/mbgl/tile/vector_tile_data.hpp')
-rw-r--r--src/mbgl/tile/vector_tile_data.hpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/mbgl/tile/vector_tile_data.hpp b/src/mbgl/tile/vector_tile_data.hpp
index ef405e34b4..303fe343fe 100644
--- a/src/mbgl/tile/vector_tile_data.hpp
+++ b/src/mbgl/tile/vector_tile_data.hpp
@@ -14,6 +14,7 @@ namespace mbgl {
class Style;
class AsyncRequest;
class GeometryTileMonitor;
+class FeatureIndex;
class VectorTileData : public TileData {
public:
@@ -35,6 +36,14 @@ public:
bool hasData() const override;
+ void queryRenderedFeatures(
+ std::unordered_map<std::string, std::vector<std::string>>& result,
+ const GeometryCollection& queryGeometry,
+ const double bearing,
+ const double tileSize,
+ const double scale,
+ const optional<std::vector<std::string>>& layerIDs) override;
+
void cancel() override;
private:
@@ -50,6 +59,9 @@ private:
// objects and they get added by tile parsing operations.
std::unordered_map<std::string, std::unique_ptr<Bucket>> buckets;
+ std::unique_ptr<FeatureIndex> featureIndex;
+ std::unique_ptr<const GeometryTile> geometryTile;
+
// Stores the placement configuration of the text that is currently placed on the screen.
PlacementConfig placedConfig;