correctly calculate placement depth
This commit is contained in:
@@ -51,6 +51,9 @@ protected:
|
||||
std::unordered_map<std::string, std::unique_ptr<Bucket>> buckets;
|
||||
|
||||
std::unique_ptr<TileParser> parser;
|
||||
|
||||
public:
|
||||
const float depth;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user