improve data indicator, offline fetching, offline area loading

This commit is contained in:
stopflock
2025-09-28 17:00:34 -05:00
parent 68289135bd
commit 0cbcec7017
12 changed files with 275 additions and 62 deletions
+1 -1
View File
@@ -55,7 +55,7 @@ class _DownloadAreaDialogState extends State<DownloadAreaDialog> {
);
}
final minZoom = kWorldMaxZoom + 1;
final minZoom = 1; // Always start from zoom 1 to show area overview when zoomed out
final maxZoom = _zoom.toInt();
// Calculate maximum possible zoom based on tile count limit
+5 -2
View File
@@ -300,8 +300,8 @@ class MapViewState extends State<MapView> {
appState.updateEditSession(target: pos.center);
}
// Show waiting indicator when map moves (user is expecting new content)
NetworkStatus.instance.setWaiting();
// Start dual-source waiting when map moves (user is expecting new tiles AND nodes)
NetworkStatus.instance.setDualSourceWaiting();
// Only clear tile queue on significant ZOOM changes (not panning)
final currentZoom = pos.zoom;
@@ -323,6 +323,9 @@ class MapViewState extends State<MapView> {
// Request more cameras on any map movement/zoom at valid zoom level (slower debounce)
if (pos.zoom >= 10) {
_cameraDebounce(_refreshCamerasFromProvider);
} else {
// Skip nodes at low zoom - report immediate completion (brutalist approach)
NetworkStatus.instance.reportNodeComplete();
}
},
),
+2 -2
View File
@@ -35,7 +35,7 @@ class NetworkStatusIndicator extends StatelessWidget {
break;
case NetworkStatusType.success:
message = 'Tiles loaded';
message = 'Done';
icon = Icons.check_circle;
color = Colors.green;
break;
@@ -43,7 +43,7 @@ class NetworkStatusIndicator extends StatelessWidget {
case NetworkStatusType.issues:
switch (networkStatus.currentIssueType) {
case NetworkIssueType.osmTiles:
message = 'OSM tiles slow';
message = 'Tile provider slow';
icon = Icons.map_outlined;
color = Colors.orange;
break;