summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2014-08-05 11:44:50 +0200
committerKonstantin Käfer <mail@kkaefer.com>2014-08-05 11:44:50 +0200
commitcdd79915050654e60905b789bba937d34f945cb7 (patch)
tree35d842c7d90d21a89f57c890681108ce0cebb83a /src
parent1ac5ed84ea1564ac0682201f02a61dfb3c738ace (diff)
downloadqtlocation-mapboxgl-cdd79915050654e60905b789bba937d34f945cb7.tar.gz
correctly calculate placement depth
Diffstat (limited to 'src')
-rw-r--r--src/map/tile_parser.cpp2
-rw-r--r--src/map/vector_tile_data.cpp3
2 files changed, 3 insertions, 2 deletions
diff --git a/src/map/tile_parser.cpp b/src/map/tile_parser.cpp
index 89ca4a41f3..97b071a163 100644
--- a/src/map/tile_parser.cpp
+++ b/src/map/tile_parser.cpp
@@ -43,7 +43,7 @@ TileParser::TileParser(const std::string &data, VectorTileData &tile,
glyphStore(glyphStore),
spriteAtlas(spriteAtlas),
sprite(sprite),
- collision(tile.id.z, 4096, tile.source.tile_size, tile.id.z >= tile.source.max_zoom ? tile.source.max_zoom - tile.id.z : 1) {
+ collision(tile.id.z, 4096, tile.source.tile_size, tile.depth) {
}
void TileParser::parse() {
diff --git a/src/map/vector_tile_data.cpp b/src/map/vector_tile_data.cpp
index cc4133e453..2bf339b65f 100644
--- a/src/map/vector_tile_data.cpp
+++ b/src/map/vector_tile_data.cpp
@@ -9,7 +9,8 @@
using namespace mbgl;
VectorTileData::VectorTileData(Tile::ID id, Map &map, const SourceInfo &source)
- : TileData(id, map, source) {
+ : TileData(id, map, source),
+ depth(id.z >= source.max_zoom ? map.getMaxZoom() - id.z : 1) {
}
VectorTileData::~VectorTileData() {