break up offline area monopoly

This commit is contained in:
stopflock committed 2025-08-07 20:52:24 -05:00
1 parent a2aa71de8f
commit f8b4134bd3
8 files changed
+451 -464

No files matched your search

+3 -2
View File
@@ -7,6 +7,7 @@ import '../widgets/map_view.dart';
import 'package:flutter_map/flutter_map.dart';
import '../services/offline_area_service.dart';
import '../widgets/add_camera_sheet.dart';
import '../services/offline_areas/offline_tile_utils.dart';
class HomeScreen extends StatefulWidget {
const HomeScreen({super.key});
@@ -129,9 +130,9 @@ class _DownloadAreaDialogState extends State<DownloadAreaDialog> {
LatLng(bounds.northEast.latitude, bounds.northEast.longitude + epsilon)
);
}
final minZoom = OfflineAreaService().findDynamicMinZoom(bounds);
final minZoom = findDynamicMinZoom(bounds);
final maxZoom = _zoom.toInt();
final nTiles = OfflineAreaService().computeTileList(bounds, minZoom, maxZoom).length;
final nTiles = computeTileList(bounds, minZoom, maxZoom).length;
const kbPerTile = 25.0; // Empirically ~6.5kB average for OSM tiles at z=1-19
final totalMb = (nTiles * kbPerTile) / 1024.0;
setState(() {
@@ -1,5 +1,6 @@
import 'package:flutter/material.dart';
import '../../services/offline_area_service.dart';
import '../../services/offline_areas/offline_area_models.dart';
class OfflineAreasSection extends StatefulWidget {
const OfflineAreasSection({super.key});