summaryrefslogtreecommitdiff
path: root/include/mbgl
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2017-04-25 12:56:59 -0700
committerJohn Firebaugh <john.firebaugh@gmail.com>2017-05-02 08:45:09 -0700
commitc2b00378b78b55d50968a9b11ed75bb4edf62ec9 (patch)
tree12a164d821dcdeb84d8a88dc231b3f2f9bef8ffd /include/mbgl
parenta2350320988bd881e261f92930b2d3359ff2071e (diff)
downloadqtlocation-mapboxgl-c2b00378b78b55d50968a9b11ed75bb4edf62ec9.tar.gz
[all] Push querySourceFeatures back out to Map
Once Source and RendererSource are split, Source will no longer have access to tiles.
Diffstat (limited to 'include/mbgl')
-rw-r--r--include/mbgl/map/map.hpp1
-rw-r--r--include/mbgl/map/query.hpp11
-rw-r--r--include/mbgl/style/query.hpp24
-rw-r--r--include/mbgl/style/source.hpp3
4 files changed, 12 insertions, 27 deletions
diff --git a/include/mbgl/map/map.hpp b/include/mbgl/map/map.hpp
index 84ea3104d8..1c0c2c544b 100644
--- a/include/mbgl/map/map.hpp
+++ b/include/mbgl/map/map.hpp
@@ -194,6 +194,7 @@ public:
// Feature queries
std::vector<Feature> queryRenderedFeatures(const ScreenCoordinate&, const RenderedQueryOptions& options = {});
std::vector<Feature> queryRenderedFeatures(const ScreenBox&, const RenderedQueryOptions& options = {});
+ std::vector<Feature> querySourceFeatures(const std::string& sourceID, const SourceQueryOptions& options = {});
AnnotationIDs queryPointAnnotations(const ScreenBox&);
diff --git a/include/mbgl/map/query.hpp b/include/mbgl/map/query.hpp
index 827424d21d..9fac60d71d 100644
--- a/include/mbgl/map/query.hpp
+++ b/include/mbgl/map/query.hpp
@@ -19,4 +19,15 @@ public:
optional<style::Filter> filter;
};
+/**
+ * Options for query source features
+ */
+class SourceQueryOptions {
+public:
+ // Required for VectorSource, ignored for GeoJSONSource
+ optional<std::vector<std::string>> sourceLayers;
+
+ optional<style::Filter> filter;
+};
+
}
diff --git a/include/mbgl/style/query.hpp b/include/mbgl/style/query.hpp
deleted file mode 100644
index 8cb2545ab4..0000000000
--- a/include/mbgl/style/query.hpp
+++ /dev/null
@@ -1,24 +0,0 @@
-#pragma once
-
-#include <mbgl/util/optional.hpp>
-#include <mbgl/style/filter.hpp>
-
-#include <string>
-#include <vector>
-
-namespace mbgl {
-namespace style {
-
-/**
- * Options for query source features
- */
-class SourceQueryOptions {
-public:
- // Required for VectorSource, ignored for GeoJSONSource
- optional<std::vector<std::string>> sourceLayers;
-
- optional<style::Filter> filter;
-};
-
-} // namespace style
-} // namespace mbgl
diff --git a/include/mbgl/style/source.hpp b/include/mbgl/style/source.hpp
index f2dfb6a896..e49f1fc273 100644
--- a/include/mbgl/style/source.hpp
+++ b/include/mbgl/style/source.hpp
@@ -6,7 +6,6 @@
#include <mbgl/util/range.hpp>
#include <mbgl/util/any.hpp>
#include <mbgl/style/types.hpp>
-#include <mbgl/style/query.hpp>
#include <memory>
#include <string>
@@ -59,8 +58,6 @@ public:
optional<std::string> getAttribution() const;
optional<Range<uint8_t>> getZoomRange() const;
- std::vector<Feature> querySourceFeatures(const SourceQueryOptions& options = {});
-
// Private implementation
class Impl;
const std::unique_ptr<Impl> baseImpl;