diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/mbgl/map/map.hpp | 1 | ||||
-rw-r--r-- | include/mbgl/map/query.hpp | 11 | ||||
-rw-r--r-- | include/mbgl/style/query.hpp | 24 | ||||
-rw-r--r-- | include/mbgl/style/source.hpp | 3 |
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; |