summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvo van Dongen <info@ivovandongen.nl>2017-03-04 18:44:13 -0800
committerIvo van Dongen <ivovandongen@users.noreply.github.com>2017-03-09 13:11:23 -0800
commit548675a196f9e55d87cf8fce837b6e60393cb1b9 (patch)
tree92bc4134eaca3141298b9e298f30d191f038d046
parentd5c2920104ea733b8ed417d2b9bdbade61b049cd (diff)
downloadqtlocation-mapboxgl-548675a196f9e55d87cf8fce837b6e60393cb1b9.tar.gz
[core] rename query options for query rendered features
-rw-r--r--include/mbgl/map/map.hpp6
-rw-r--r--include/mbgl/map/query.hpp4
-rw-r--r--platform/node/src/node_map.cpp2
-rw-r--r--src/mbgl/geometry/feature_index.cpp4
-rw-r--r--src/mbgl/geometry/feature_index.hpp6
-rw-r--r--src/mbgl/map/map.cpp6
-rw-r--r--src/mbgl/style/source_impl.cpp2
-rw-r--r--src/mbgl/style/source_impl.hpp4
-rw-r--r--src/mbgl/style/style.cpp2
-rw-r--r--src/mbgl/style/style.hpp6
-rw-r--r--src/mbgl/tile/geometry_tile.cpp2
-rw-r--r--src/mbgl/tile/geometry_tile.hpp2
-rw-r--r--src/mbgl/tile/tile.cpp2
-rw-r--r--src/mbgl/tile/tile.hpp4
14 files changed, 26 insertions, 26 deletions
diff --git a/include/mbgl/map/map.hpp b/include/mbgl/map/map.hpp
index 7e4eeb8d5b..02e14bea4e 100644
--- a/include/mbgl/map/map.hpp
+++ b/include/mbgl/map/map.hpp
@@ -182,9 +182,9 @@ public:
double getDefaultPitch() const;
// Feature queries
- std::vector<Feature> queryRenderedFeatures(const ScreenCoordinate&, const QueryOptions& options = {});
- std::vector<Feature> queryRenderedFeatures(const ScreenBox&, const QueryOptions& options = {});
-
+ std::vector<Feature> queryRenderedFeatures(const ScreenCoordinate&, const RenderedQueryOptions& options = {});
+ std::vector<Feature> queryRenderedFeatures(const ScreenBox&, const RenderedQueryOptions& options = {});
+
AnnotationIDs queryPointAnnotations(const ScreenBox&);
// Memory
diff --git a/include/mbgl/map/query.hpp b/include/mbgl/map/query.hpp
index e864dbaa67..201484cd84 100644
--- a/include/mbgl/map/query.hpp
+++ b/include/mbgl/map/query.hpp
@@ -6,9 +6,9 @@
namespace mbgl {
/**
- * Options for Map queries.
+ * Options for query rendered features.
*/
-class QueryOptions {
+class RenderedQueryOptions {
public:
/** layerIDs to include in the query */
optional<std::vector<std::string>> layerIDs;
diff --git a/platform/node/src/node_map.cpp b/platform/node/src/node_map.cpp
index 174db7d737..f6b672efee 100644
--- a/platform/node/src/node_map.cpp
+++ b/platform/node/src/node_map.cpp
@@ -882,7 +882,7 @@ void NodeMap::QueryRenderedFeatures(const Nan::FunctionCallbackInfo<v8::Value>&
return Nan::ThrowTypeError("First argument must have two components");
}
- mbgl::QueryOptions queryOptions;
+ mbgl::RenderedQueryOptions queryOptions;
if (!info[1]->IsNull() && !info[1]->IsUndefined()) {
if (!info[1]->IsObject()) {
return Nan::ThrowTypeError("options argument must be an object");
diff --git a/src/mbgl/geometry/feature_index.cpp b/src/mbgl/geometry/feature_index.cpp
index 64fb7bd247..0a159f2ce2 100644
--- a/src/mbgl/geometry/feature_index.cpp
+++ b/src/mbgl/geometry/feature_index.cpp
@@ -59,7 +59,7 @@ void FeatureIndex::query(
const float bearing,
const double tileSize,
const double scale,
- const QueryOptions& queryOptions,
+ const RenderedQueryOptions& queryOptions,
const GeometryTileData& geometryTileData,
const CanonicalTileID& tileID,
const style::Style& style,
@@ -98,7 +98,7 @@ void FeatureIndex::addFeature(
std::unordered_map<std::string, std::vector<Feature>>& result,
const IndexedSubfeature& indexedFeature,
const GeometryCoordinates& queryGeometry,
- const QueryOptions& options,
+ const RenderedQueryOptions& options,
const GeometryTileData& geometryTileData,
const CanonicalTileID& tileID,
const style::Style& style,
diff --git a/src/mbgl/geometry/feature_index.hpp b/src/mbgl/geometry/feature_index.hpp
index d2f68fd103..61f0bad4d5 100644
--- a/src/mbgl/geometry/feature_index.hpp
+++ b/src/mbgl/geometry/feature_index.hpp
@@ -11,7 +11,7 @@
namespace mbgl {
-class QueryOptions;
+class RenderedQueryOptions;
namespace style {
class Style;
@@ -41,7 +41,7 @@ public:
const float bearing,
const double tileSize,
const double scale,
- const QueryOptions& options,
+ const RenderedQueryOptions& options,
const GeometryTileData&,
const CanonicalTileID&,
const style::Style&,
@@ -61,7 +61,7 @@ private:
std::unordered_map<std::string, std::vector<Feature>>& result,
const IndexedSubfeature&,
const GeometryCoordinates& queryGeometry,
- const QueryOptions& options,
+ const RenderedQueryOptions& options,
const GeometryTileData&,
const CanonicalTileID&,
const style::Style&,
diff --git a/src/mbgl/map/map.cpp b/src/mbgl/map/map.cpp
index f4f4d67148..f4e994c931 100644
--- a/src/mbgl/map/map.cpp
+++ b/src/mbgl/map/map.cpp
@@ -809,7 +809,7 @@ void Map::removeAnnotation(AnnotationID annotation) {
#pragma mark - Feature query api
-std::vector<Feature> Map::queryRenderedFeatures(const ScreenCoordinate& point, const QueryOptions& options) {
+std::vector<Feature> Map::queryRenderedFeatures(const ScreenCoordinate& point, const RenderedQueryOptions& options) {
if (!impl->style) return {};
return impl->style->queryRenderedFeatures(
@@ -819,7 +819,7 @@ std::vector<Feature> Map::queryRenderedFeatures(const ScreenCoordinate& point, c
);
}
-std::vector<Feature> Map::queryRenderedFeatures(const ScreenBox& box, const QueryOptions& options) {
+std::vector<Feature> Map::queryRenderedFeatures(const ScreenBox& box, const RenderedQueryOptions& options) {
if (!impl->style) return {};
return impl->style->queryRenderedFeatures(
@@ -836,7 +836,7 @@ std::vector<Feature> Map::queryRenderedFeatures(const ScreenBox& box, const Quer
}
AnnotationIDs Map::queryPointAnnotations(const ScreenBox& box) {
- QueryOptions options;
+ RenderedQueryOptions options;
options.layerIDs = {{ AnnotationManager::PointLayerID }};
auto features = queryRenderedFeatures(box, options);
std::set<AnnotationID> set;
diff --git a/src/mbgl/style/source_impl.cpp b/src/mbgl/style/source_impl.cpp
index fdacb00b4c..f83579d0d0 100644
--- a/src/mbgl/style/source_impl.cpp
+++ b/src/mbgl/style/source_impl.cpp
@@ -206,7 +206,7 @@ void Source::Impl::reloadTiles() {
std::unordered_map<std::string, std::vector<Feature>> Source::Impl::queryRenderedFeatures(const ScreenLineString& geometry,
const TransformState& transformState,
- const QueryOptions& options) const {
+ const RenderedQueryOptions& options) const {
std::unordered_map<std::string, std::vector<Feature>> result;
if (renderTiles.empty() || geometry.empty()) {
return result;
diff --git a/src/mbgl/style/source_impl.hpp b/src/mbgl/style/source_impl.hpp
index 54af93c04f..6e16a31e5a 100644
--- a/src/mbgl/style/source_impl.hpp
+++ b/src/mbgl/style/source_impl.hpp
@@ -24,6 +24,7 @@ class Painter;
class FileSource;
class TransformState;
class RenderTile;
+class RenderedQueryOptions;
namespace algorithm {
class ClipIDGenerator;
@@ -32,7 +33,6 @@ class ClipIDGenerator;
namespace style {
class UpdateParameters;
-class QueryParameters;
class SourceObserver;
class Source::Impl : public TileObserver, private util::noncopyable {
@@ -68,7 +68,7 @@ public:
std::unordered_map<std::string, std::vector<Feature>>
queryRenderedFeatures(const ScreenLineString& geometry,
const TransformState& transformState,
- const QueryOptions& options) const;
+ const RenderedQueryOptions& options) const;
void setCacheSize(size_t);
void onLowMemory();
diff --git a/src/mbgl/style/style.cpp b/src/mbgl/style/style.cpp
index 5b45ca27ef..ac3d83b5cd 100644
--- a/src/mbgl/style/style.cpp
+++ b/src/mbgl/style/style.cpp
@@ -505,7 +505,7 @@ RenderData Style::getRenderData(MapDebugOptions debugOptions, float angle) const
std::vector<Feature> Style::queryRenderedFeatures(const ScreenLineString& geometry,
const TransformState& transformState,
- const QueryOptions& options) const {
+ const RenderedQueryOptions& options) const {
std::unordered_set<std::string> sourceFilter;
if (options.layerIDs) {
diff --git a/src/mbgl/style/style.hpp b/src/mbgl/style/style.hpp
index 5246f6877d..36ccd1f30e 100644
--- a/src/mbgl/style/style.hpp
+++ b/src/mbgl/style/style.hpp
@@ -29,7 +29,7 @@ class SpriteAtlas;
class LineAtlas;
class RenderData;
class TransformState;
-class QueryOptions;
+class RenderedQueryOptions;
namespace style {
@@ -99,8 +99,8 @@ public:
std::vector<Feature> queryRenderedFeatures(const ScreenLineString& geometry,
const TransformState& transformState,
- const QueryOptions& options) const;
-
+ const RenderedQueryOptions& options) const;
+
float getQueryRadius() const;
void setSourceTileCacheSize(size_t);
diff --git a/src/mbgl/tile/geometry_tile.cpp b/src/mbgl/tile/geometry_tile.cpp
index 83d130841d..01f054bdf4 100644
--- a/src/mbgl/tile/geometry_tile.cpp
+++ b/src/mbgl/tile/geometry_tile.cpp
@@ -142,7 +142,7 @@ void GeometryTile::queryRenderedFeatures(
std::unordered_map<std::string, std::vector<Feature>>& result,
const GeometryCoordinates& queryGeometry,
const TransformState& transformState,
- const QueryOptions& options) {
+ const RenderedQueryOptions& options) {
if (!featureIndex || !data) return;
diff --git a/src/mbgl/tile/geometry_tile.hpp b/src/mbgl/tile/geometry_tile.hpp
index 85a068ee01..538ea4fbd2 100644
--- a/src/mbgl/tile/geometry_tile.hpp
+++ b/src/mbgl/tile/geometry_tile.hpp
@@ -44,7 +44,7 @@ public:
std::unordered_map<std::string, std::vector<Feature>>& result,
const GeometryCoordinates& queryGeometry,
const TransformState&,
- const QueryOptions& options) override;
+ const RenderedQueryOptions& options) override;
void cancel() override;
diff --git a/src/mbgl/tile/tile.cpp b/src/mbgl/tile/tile.cpp
index 4829ac8355..2f347fb950 100644
--- a/src/mbgl/tile/tile.cpp
+++ b/src/mbgl/tile/tile.cpp
@@ -33,6 +33,6 @@ void Tile::queryRenderedFeatures(
std::unordered_map<std::string, std::vector<Feature>>&,
const GeometryCoordinates&,
const TransformState&,
- const QueryOptions&) {}
+ const RenderedQueryOptions&) {}
} // namespace mbgl
diff --git a/src/mbgl/tile/tile.hpp b/src/mbgl/tile/tile.hpp
index 0f0babf085..b335d1a5d5 100644
--- a/src/mbgl/tile/tile.hpp
+++ b/src/mbgl/tile/tile.hpp
@@ -21,7 +21,7 @@ class DebugBucket;
class TransformState;
class TileObserver;
class PlacementConfig;
-class QueryOptions;
+class RenderedQueryOptions;
namespace style {
class Layer;
@@ -56,7 +56,7 @@ public:
std::unordered_map<std::string, std::vector<Feature>>& result,
const GeometryCoordinates& queryGeometry,
const TransformState&,
- const QueryOptions& options);
+ const RenderedQueryOptions& options);
void setTriedOptional();