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 +++++++++++ 2 files changed, 12 insertions(+) (limited to 'include/mbgl/map') 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; +}; + } -- cgit v1.2.1