summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mbgl/source/source.cpp6
-rw-r--r--src/mbgl/tile/tile_data.cpp6
-rw-r--r--src/mbgl/tile/tile_data.hpp7
-rw-r--r--src/mbgl/tile/vector_tile_data.cpp16
-rw-r--r--src/mbgl/tile/vector_tile_data.hpp6
5 files changed, 20 insertions, 21 deletions
diff --git a/src/mbgl/source/source.cpp b/src/mbgl/source/source.cpp
index 1ef818a0aa..c80c6ac0b3 100644
--- a/src/mbgl/source/source.cpp
+++ b/src/mbgl/source/source.cpp
@@ -365,10 +365,8 @@ std::unordered_map<std::string, std::vector<Feature>> Source::queryRenderedFeatu
}
tile.data.queryRenderedFeatures(result,
- { tileSpaceQueryGeometry },
- parameters.transformState.getAngle(),
- util::tileSize * tile.data.id.overscaleFactor(),
- std::pow(2, parameters.transformState.getZoom() - tile.data.id.overscaledZ),
+ tileSpaceQueryGeometry,
+ parameters.transformState,
parameters.layerIDs);
}
diff --git a/src/mbgl/tile/tile_data.cpp b/src/mbgl/tile/tile_data.cpp
index d5179c5b0b..0c3bbb4390 100644
--- a/src/mbgl/tile/tile_data.cpp
+++ b/src/mbgl/tile/tile_data.cpp
@@ -31,10 +31,8 @@ void TileData::dumpDebugLogs() const {
void TileData::queryRenderedFeatures(
std::unordered_map<std::string, std::vector<Feature>>&,
- const GeometryCollection&,
- const double,
- const double,
- const double,
+ const GeometryCoordinates&,
+ const TransformState&,
const optional<std::vector<std::string>>&) {}
} // namespace mbgl
diff --git a/src/mbgl/tile/tile_data.hpp b/src/mbgl/tile/tile_data.hpp
index e6af71f14e..738b872bf5 100644
--- a/src/mbgl/tile/tile_data.hpp
+++ b/src/mbgl/tile/tile_data.hpp
@@ -21,6 +21,7 @@ namespace mbgl {
class StyleLayer;
class Worker;
class DebugBucket;
+class TransformState;
class TileData : private util::noncopyable {
public:
@@ -87,10 +88,8 @@ public:
virtual void queryRenderedFeatures(
std::unordered_map<std::string, std::vector<Feature>>& result,
- const GeometryCollection& queryGeometry,
- const double bearing,
- const double tileSize,
- const double scale,
+ const GeometryCoordinates& queryGeometry,
+ const TransformState&,
const optional<std::vector<std::string>>& layerIDs);
bool isReady() const {
diff --git a/src/mbgl/tile/vector_tile_data.cpp b/src/mbgl/tile/vector_tile_data.cpp
index 64236c4ce8..457ffd4171 100644
--- a/src/mbgl/tile/vector_tile_data.cpp
+++ b/src/mbgl/tile/vector_tile_data.cpp
@@ -7,6 +7,7 @@
#include <mbgl/storage/file_source.hpp>
#include <mbgl/geometry/feature_index.hpp>
#include <mbgl/text/collision_tile.hpp>
+#include <mbgl/map/transform_state.hpp>
namespace mbgl {
@@ -192,15 +193,20 @@ void VectorTileData::redoPlacement(const std::function<void()>& callback) {
void VectorTileData::queryRenderedFeatures(
std::unordered_map<std::string, std::vector<Feature>>& result,
- const GeometryCollection& queryGeometry,
- const double bearing,
- const double tileSize,
- const double scale,
+ const GeometryCoordinates& queryGeometry,
+ const TransformState& transformState,
const optional<std::vector<std::string>>& layerIDs) {
if (!featureIndex || !geometryTile) return;
- featureIndex->query(result, queryGeometry, bearing, tileSize, scale, layerIDs, *geometryTile, style);
+ featureIndex->query(result,
+ { queryGeometry },
+ transformState.getAngle(),
+ util::tileSize * id.overscaleFactor(),
+ std::pow(2, transformState.getZoom() - id.overscaledZ),
+ layerIDs,
+ *geometryTile,
+ style);
}
void VectorTileData::cancel() {
diff --git a/src/mbgl/tile/vector_tile_data.hpp b/src/mbgl/tile/vector_tile_data.hpp
index e785595913..c64d255a0a 100644
--- a/src/mbgl/tile/vector_tile_data.hpp
+++ b/src/mbgl/tile/vector_tile_data.hpp
@@ -39,10 +39,8 @@ public:
void queryRenderedFeatures(
std::unordered_map<std::string, std::vector<Feature>>& result,
- const GeometryCollection& queryGeometry,
- const double bearing,
- const double tileSize,
- const double scale,
+ const GeometryCoordinates& queryGeometry,
+ const TransformState&,
const optional<std::vector<std::string>>& layerIDs) override;
void cancel() override;