[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:
John Firebaugh
2017-04-25 12:56:59 -07:00
parent a235032098
commit c2b00378b7
23 changed files with 70 additions and 61 deletions

View File

@@ -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 }};