Fix offline area size estimates, zoom level metadata display

This commit is contained in:
stopflock committed 2025-09-28 17:43:03 -05:00
1 parent 25f0e358a3
commit 7c49b38230
3 files changed
+7 -9

No files matched your search

+4 -6
View File
@@ -63,15 +63,13 @@ class _DownloadAreaDialogState extends State<DownloadAreaDialog> {
final nTiles = computeTileList(bounds, minZoom, maxZoom).length;
final totalMb = (nTiles * kTileEstimateKb) / 1024.0;
// Debug logging to check calculation
debugPrint('[DownloadDialog] Tiles: $nTiles, EstimateKb: $kTileEstimateKb, Total MB: $totalMb');
final roundedMb = (totalMb * 10).round() / 10; // Round to nearest tenth
setState(() {
_minZoom = minZoom;
_maxPossibleZoom = maxPossibleZoom;
_tileCount = nTiles;
_mbEstimate = totalMb;
_mbEstimate = roundedMb;
});
}
@@ -257,8 +255,8 @@ class _DownloadAreaDialogState extends State<DownloadAreaDialog> {
OfflineAreaService().downloadArea(
id: id,
bounds: bounds,
minZoom: _minZoom ?? 12,
maxZoom: maxZoom,
minZoom: _minZoom ?? 1,
maxZoom: _zoom.toInt(),
directory: dir,
onProgress: (progress) {},
onComplete: (status) {},