From c2b00378b78b55d50968a9b11ed75bb4edf62ec9 Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Tue, 25 Apr 2017 12:56:59 -0700 Subject: [all] Push querySourceFeatures back out to Map Once Source and RendererSource are split, Source will no longer have access to tiles. --- include/mbgl/map/map.hpp | 1 + include/mbgl/map/query.hpp | 11 +++++++++++ include/mbgl/style/query.hpp | 24 ------------------------ include/mbgl/style/source.hpp | 3 --- 4 files changed, 12 insertions(+), 27 deletions(-) delete mode 100644 include/mbgl/style/query.hpp (limited to 'include') 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 queryRenderedFeatures(const ScreenCoordinate&, const RenderedQueryOptions& options = {}); std::vector queryRenderedFeatures(const ScreenBox&, const RenderedQueryOptions& options = {}); + std::vector 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 filter; }; +/** + * Options for query source features + */ +class SourceQueryOptions { +public: + // Required for VectorSource, ignored for GeoJSONSource + optional> sourceLayers; + + optional 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 -#include - -#include -#include - -namespace mbgl { -namespace style { - -/** - * Options for query source features - */ -class SourceQueryOptions { -public: - // Required for VectorSource, ignored for GeoJSONSource - optional> sourceLayers; - - optional 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 #include #include -#include #include #include @@ -59,8 +58,6 @@ public: optional getAttribution() const; optional> getZoomRange() const; - std::vector querySourceFeatures(const SourceQueryOptions& options = {}); - // Private implementation class Impl; const std::unique_ptr baseImpl; -- cgit v1.2.1