first attempts to pull local data from offline areas

This commit is contained in:
stopflock
2025-08-10 16:42:31 -05:00
parent 167f3cc0a0
commit 20bd04e338
4 changed files with 181 additions and 23 deletions
@@ -34,11 +34,6 @@ class TileProviderWithCache extends TileProvider {
void _fetchAndCacheTile(TileCoordinates coords, String key, {MapSource source = MapSource.auto}) async {
// Don't fire multiple fetches for the same tile simultaneously
if (_tileCache.containsKey(key)) return;
// Only block REMOTE fetch in offline mode, but allow local/offline sources in the future.
if (AppState.instance.offlineMode && source != MapSource.local) {
print('[TileProviderWithCache] BLOCKED tile $key due to offline mode');
return;
}
try {
final bytes = await MapDataProvider().getTile(
z: coords.z, x: coords.x, y: coords.y, source: source,