MTOfflineError

public enum MTOfflineError : Error, LocalizedError, Sendable, Equatable

Represents errors that can occur during the offline planning and downloading process.

HTTP Failures

  • The provided URL was invalid.

    Declaration

    Swift

    case invalidURL(String)
  • The server returned a bad HTTP response with the given status code.

    Declaration

    Swift

    case badResponse(statusCode: Int)
  • A general network connectivity issue or URLSession error occurred.

    Declaration

    Swift

    case networkError(URLError)
  • The server returned a 204 No Content response, which is unexpected for this resource.

    Declaration

    Swift

    case noContent
  • The received content format or type does not match the expected format.

    Declaration

    Swift

    case contentMismatch(expected: String, actual: String)

JSON Failures

  • The JSON data is malformed or invalid.

    Declaration

    Swift

    case malformedJSON
  • A required key is missing in style.json or TileJSON.

    Declaration

    Swift

    case missingKey(String)
  • An error occurred while decoding JSON into a Swift type.

    Declaration

    Swift

    case decodingError(DecodingError)

Domain-Specific Cases

  • The provided bounding box is invalid.

    Declaration

    Swift

    case invalidBoundingBox
  • The minimum zoom level is greater than the maximum zoom level.

    Declaration

    Swift

    case reversedZoomLevels(minZoom: Double, maxZoom: Double)
  • The API key is missing.

    Declaration

    Swift

    case missingAPIKey

Storage and Limitations

  • The device does not have enough available storage space to complete the download.

    Declaration

    Swift

    case insufficientStorage
  • The requested offline region exceeds the maximum allowed tile count or size.

    Declaration

    Swift

    case exceedsMaximumTileCount(limit: Int, requested: Int)
  • A file system error occurred while attempting to save or read offline data.

    Declaration

    Swift

    case fileSystemError(String)
  • The requested offline region resulted in no tiles. This typically happens when the area is too small for the selected zoom level.

    Declaration

    Swift

    case invalidRegion
  • The offline download or operation was cancelled by the user or system.

    Declaration

    Swift

    case cancelled
  • Declaration

    Swift

    public var errorDescription: String? { get }
  • Declaration

    Swift

    public var recoverySuggestion: String? { get }
  • Declaration

    Swift

    public static func == (lhs: MTOfflineError, rhs: MTOfflineError) -> Bool