Move getMin/MaxZoom to TransformState

This commit is contained in:
John Firebaugh
2015-06-25 13:35:07 -07:00
parent 874aa69efb
commit e87a36444f
6 changed files with 50 additions and 52 deletions

View File

@@ -468,7 +468,7 @@ bool Source::update(MapData& data,
if (info.type != SourceType::Raster && cache.getSize() == 0) {
size_t conservativeCacheSize = ((float)transformState.getWidth() / util::tileSize) *
((float)transformState.getHeight() / util::tileSize) *
(data.transform.getMaxZoom() - data.transform.getMinZoom() + 1) *
(transformState.getMaxZoom() - transformState.getMinZoom() + 1) *
0.5;
cache.setSize(conservativeCacheSize);
}