GeoLeaf Core API - v3.19.0
    Preparing search index...
    • Decides ONE layer's status from its declaration and its marker.

      The test order is the reading order, and it is not commutative: notDeclared trumps everything (an undeclared layer has no offline state to report), then the absent marker, then the failure, then the unfinished run, and staleness only comes last — on a pull that succeeded AND finished.

      Parameters

      • declared: boolean

        True when the layer declares a pull source (offline.source.url).

      • state: LayerPullState | undefined

        The persisted marker, or undefined when no pull ever happened.

      • maxAgeMs: number | undefined

        Expiry declared by the layer, or undefined.

      • now: number

        Reference instant, injected to stay testable at a frozen clock.

      Returns LayerOfflineStatus

      The status, never guessed.