summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorChris Loer <chris.loer@gmail.com>2018-11-29 12:50:10 -0800
committerChris Loer <chris.loer@mapbox.com>2018-11-30 12:30:50 -0800
commitf87ef3f72a6f2beda88bdc25dfbdeb169332603b (patch)
tree101a34d7ba78467ced9d9fdaa516717a2e6c6d87 /include
parent01510619474d109e8eb80a4e328758007850dc72 (diff)
downloadqtlocation-mapboxgl-f87ef3f72a6f2beda88bdc25dfbdeb169332603b.tar.gz
[core] OverscaledTileID::isChildOf should check wrap values.
Fixes issue #13478
Diffstat (limited to 'include')
-rw-r--r--include/mbgl/tile/tile_id.hpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/mbgl/tile/tile_id.hpp b/include/mbgl/tile/tile_id.hpp
index dd2fba573d..7371916449 100644
--- a/include/mbgl/tile/tile_id.hpp
+++ b/include/mbgl/tile/tile_id.hpp
@@ -181,7 +181,8 @@ inline uint32_t OverscaledTileID::overscaleFactor() const {
}
inline bool OverscaledTileID::isChildOf(const OverscaledTileID& rhs) const {
- return overscaledZ > rhs.overscaledZ &&
+ return wrap == rhs.wrap &&
+ overscaledZ > rhs.overscaledZ &&
(canonical == rhs.canonical || canonical.isChildOf(rhs.canonical));
}