pass SourceInfo object to TileData so that we can not skip buckets that appear later than the source maxzoom

This commit is contained in:
Konstantin Käfer
2014-07-17 15:52:39 -07:00
parent 3141b8b1f7
commit 9ed0ca5983
8 changed files with 28 additions and 24 deletions

View File

@@ -109,9 +109,8 @@ std::unique_ptr<Bucket> TileParser::createBucket(std::shared_ptr<StyleBucket> bu
}
// Skip this bucket if we are to not render this
if (tile.id.z < bucket_desc->min_zoom || tile.id.z > bucket_desc->max_zoom) {
return nullptr;
}
if (tile.id.z < bucket_desc->min_zoom && bucket_desc->min_zoom < tile.source.max_zoom) return nullptr;
if (tile.id.z >= bucket_desc->max_zoom) return nullptr;
auto layer_it = vector_data.layers.find(bucket_desc->source_layer);
if (layer_it != vector_data.layers.end()) {