Only emit tile updated signals when the tile really changes
We only emit signals when the number of buckets increase (i.e. the new data that arrived added a new bucket to the tile). Also, if we try to reparse a partial tile but it is not possible, we keep the flag up for trying to reparse it again on the next update, because the data might have arrived after the bucket that is waiting for the data was processed but before the end of the parsing. Fixes #1458
This commit is contained in:
@@ -82,6 +82,12 @@ Bucket* VectorTileData::getBucket(StyleLayer const& layer) {
|
||||
return it->second.get();
|
||||
}
|
||||
|
||||
size_t VectorTileData::countBuckets() const {
|
||||
std::lock_guard<std::mutex> lock(bucketsMutex);
|
||||
|
||||
return buckets.size();
|
||||
}
|
||||
|
||||
void VectorTileData::setBucket(StyleLayer const& layer, std::unique_ptr<Bucket> bucket) {
|
||||
assert(layer.bucket);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user