[all] Push querySourceFeatures back out to Map
Once Source and RendererSource are split, Source will no longer have access to tiles.
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
#include <mbgl/map/transform_state.hpp>
|
||||
#include <mbgl/annotation/annotation_manager.hpp>
|
||||
#include <mbgl/style/style.hpp>
|
||||
#include <mbgl/style/source.hpp>
|
||||
#include <mbgl/style/source_impl.hpp>
|
||||
#include <mbgl/style/layer.hpp>
|
||||
#include <mbgl/style/light.hpp>
|
||||
#include <mbgl/style/observer.hpp>
|
||||
@@ -868,6 +868,15 @@ std::vector<Feature> Map::queryRenderedFeatures(const ScreenBox& box, const Rend
|
||||
);
|
||||
}
|
||||
|
||||
std::vector<Feature> Map::querySourceFeatures(const std::string& sourceID, const SourceQueryOptions& options) {
|
||||
if (!impl->style) return {};
|
||||
|
||||
const style::Source* source = impl->style->getSource(sourceID);
|
||||
if (!source) return {};
|
||||
|
||||
return source->baseImpl->querySourceFeatures(options);
|
||||
}
|
||||
|
||||
AnnotationIDs Map::queryPointAnnotations(const ScreenBox& box) {
|
||||
RenderedQueryOptions options;
|
||||
options.layerIDs = {{ AnnotationManager::PointLayerID }};
|
||||
|
||||
Reference in New Issue
Block a user