Files
satellite-provider/SatelliteProvider.Common/Configs/MapConfig.cs
T
Oleksandr Bezdieniezhnykh 1dcd089d39 [AZ-371] Refactor C18: magic numbers to ProcessingConfig/MapConfig
Promotes 8 operational levers into config keys with defaults that match
the prior source literals byte-for-byte:
  ProcessingConfig: RegionProcessingTimeoutSeconds (300),
  RouteProcessingPollIntervalSeconds (5),
  MaxRoutePointSpacingMeters (200), LatLonTolerance (0.0001).
  MapConfig: TileSizePixels (256), AllowedZoomLevels ([15..19]),
  RetryBaseDelaySeconds (1), RetryMaxDelaySeconds (30).

Sites updated: RegionService, RouteProcessingService,
RoutePointGraphBuilder, RouteValidator, RouteService 4-arg ctor,
RouteImageRenderer, GoogleMapsDownloaderV2, TileService. Closes LF-2 by
forwarding HttpContext.RequestAborted from GetTileByLatLon into the
downloader. appsettings.json gains the 8 new keys at default values.

Tests: 141 / 141 unit + 5 / 5 smoke green. New ConfigDefaultsTests pins
defaults to original literals; new TileService unit test asserts CT
identity from caller to downloader (AZ-371 AC-3).

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-11 03:30:07 +03:00

14 lines
500 B
C#

namespace SatelliteProvider.Common.Configs;
public class MapConfig
{
public string Service { get; set; } = null!;
public string ApiKey { get; set; } = null!;
// AZ-371 / C18 — Google Maps tile constants promoted from source literals.
public int TileSizePixels { get; set; } = 256;
public int[] AllowedZoomLevels { get; set; } = new[] { 15, 16, 17, 18, 19 };
public int RetryBaseDelaySeconds { get; set; } = 1;
public int RetryMaxDelaySeconds { get; set; } = 30;
}