diff options
author | Aleksandar Stojiljkovic <aleksandar.stojiljkovic@mapbox.com> | 2019-08-23 12:04:32 +0300 |
---|---|---|
committer | Aleksandar Stojiljkovic <aleksandar.stojiljkovic@mapbox.com> | 2019-08-23 16:43:05 +0300 |
commit | 9eff849c743c6e861404a2c39afa53c4eecdca3d (patch) | |
tree | 6c6eaaaf5f29b1570e3fc00aa5fb9ab16bedb7da /src/mbgl/util/tile_cover.hpp | |
parent | 13d2667035f8e5d8319556a275bb60093e24130d (diff) | |
download | qtlocation-mapboxgl-9eff849c743c6e861404a2c39afa53c4eecdca3d.tar.gz |
[core] Fix tileCover / TileCoordinate fromScreenCoordinate(#15442)
Remove unecessary tile coordinate unproject -> project step.
Unproject+project isn't always a noop and this was the issue leading to wrong cover calculation in high pitch values.
Fixes: https://github.com/mapbox/mapbox-gl-native/issues/15442
Diffstat (limited to 'src/mbgl/util/tile_cover.hpp')
-rw-r--r-- | src/mbgl/util/tile_cover.hpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mbgl/util/tile_cover.hpp b/src/mbgl/util/tile_cover.hpp index c953d764d2..5ac3537bf6 100644 --- a/src/mbgl/util/tile_cover.hpp +++ b/src/mbgl/util/tile_cover.hpp @@ -18,9 +18,9 @@ namespace util { // Helper class to stream tile-cover results per row class TileCover { public: - TileCover(const LatLngBounds&, int32_t z); + TileCover(const LatLngBounds&, uint8_t z); // When project == true, projects the geometry points to tile coordinates - TileCover(const Geometry<double>&, int32_t z, bool project = true); + TileCover(const Geometry<double>&, uint8_t z, bool project = true); ~TileCover(); optional<UnwrappedTileID> next(); @@ -33,9 +33,9 @@ private: int32_t coveringZoomLevel(double z, style::SourceType type, uint16_t tileSize); -std::vector<UnwrappedTileID> tileCover(const TransformState&, int32_t z); -std::vector<UnwrappedTileID> tileCover(const LatLngBounds&, int32_t z); -std::vector<UnwrappedTileID> tileCover(const Geometry<double>&, int32_t z); +std::vector<UnwrappedTileID> tileCover(const TransformState&, uint8_t z); +std::vector<UnwrappedTileID> tileCover(const LatLngBounds&, uint8_t z); +std::vector<UnwrappedTileID> tileCover(const Geometry<double>&, uint8_t z); // Compute only the count of tiles needed for tileCover uint64_t tileCount(const LatLngBounds&, uint8_t z); |