preloadMapSettings function
Preloads map settings in the background to warm up cache. Call this on app startup to make settings instantly available. Uses smart loading: if no local cache, loads from POD first.
Implementation
Future<void> preloadMapSettings() async {
try {
// Smart load: if no local cache, try POD first.
await MapSettingsService.loadSettingsSmart().catchError((_) {
// Silently ignore preload errors - will use defaults.
return MapSettings(mapSource: MapSettings.getDefaultMapSource());
});
} catch (_) {
// Silently ignore preload errors.
}
}