diff options
author | Alexander Shalamov <alexander.shalamov@mapbox.com> | 2018-11-14 16:30:10 +0200 |
---|---|---|
committer | Alexander Shalamov <alexander.shalamov@mapbox.com> | 2018-12-12 15:08:18 +0200 |
commit | a1ca06e304a14582a90b258e817ec6f17d72fb11 (patch) | |
tree | 43d8d6a499388aa17bd1e182bbaa072cd4e77693 /include | |
parent | 664ceb43980cb7d90a0d8b5fa1a48f83662322c9 (diff) | |
download | qtlocation-mapboxgl-a1ca06e304a14582a90b258e817ec6f17d72fb11.tar.gz |
[core] Introduce Renderer::queryFeatureExtension API
New interface allows it's users to query additional information about
feature that was provided by qRF interface. This is particularly
useful for clustered features.
Diffstat (limited to 'include')
-rw-r--r-- | include/mbgl/renderer/renderer.hpp | 9 | ||||
-rw-r--r-- | include/mbgl/util/geojson.hpp | 2 |
2 files changed, 10 insertions, 1 deletions
diff --git a/include/mbgl/renderer/renderer.hpp b/include/mbgl/renderer/renderer.hpp index 798928087a..644dd0fcf9 100644 --- a/include/mbgl/renderer/renderer.hpp +++ b/include/mbgl/renderer/renderer.hpp @@ -4,7 +4,7 @@ #include <mbgl/renderer/mode.hpp> #include <mbgl/annotation/annotation.hpp> #include <mbgl/util/geo.hpp> -#include <mbgl/util/geo.hpp> +#include <mbgl/util/geojson.hpp> #include <functional> #include <memory> @@ -44,6 +44,13 @@ public: AnnotationIDs queryShapeAnnotations(const ScreenBox& box) const; AnnotationIDs getAnnotationIDs(const std::vector<Feature>&) const; + // Feature extension query + FeatureExtensionValue queryFeatureExtensions(const std::string& sourceID, + const Feature& feature, + const std::string& extension, + const std::string& extensionField, + const optional<std::map<std::string, Value>>& args = {}) const; + // Debug void dumpDebugLogs(); diff --git a/include/mbgl/util/geojson.hpp b/include/mbgl/util/geojson.hpp index b4e789a3ac..2a6569be49 100644 --- a/include/mbgl/util/geojson.hpp +++ b/include/mbgl/util/geojson.hpp @@ -1,10 +1,12 @@ #pragma once #include <mapbox/geojson.hpp> +#include <mbgl/util/feature.hpp> namespace mbgl { using GeoJSON = mapbox::geojson::geojson; using FeatureCollection = mapbox::geojson::feature_collection; +using FeatureExtensionValue = mapbox::util::variant<Value, FeatureCollection>; } // namespace mbgl |