MTOfflineZoomRange
public struct MTOfflineZoomRange : Equatable
Defines and validates a zoom range for offline tile calculations.
-
Undocumented
Declaration
Swift
public let minZoom: Int -
Undocumented
Declaration
Swift
public let maxZoom: Int -
Initializes a zoom range.
Throws
MTOfflineCoverageInputErrorif zoom levels are negative or if minZoom > maxZoom. Note: Zoom levels greater than 22 are clamped to 22.Declaration
Swift
public init(minZoom: Int, maxZoom: Int) throwsParameters
minZoomThe minimum zoom level. Must be >= 0.
maxZoomThe maximum zoom level. Must be >= 0 and >= minZoom.
-
Clamps the zoom range to the limits provided by a source (e.g., from TileJSON).
Declaration
Swift
public func clamped(toSourceMin sourceMin: Int, sourceMax: Int) -> MTOfflineZoomRange?Parameters
sourceMinThe minimum zoom level supported by the source.
sourceMaxThe maximum zoom level supported by the source.
Return Value
A new
MTOfflineZoomRangeclamped to the source limits, ornilif the requested range falls completely outside the source limits (e.g., requesting zoom 12-14 from a source that only provides 0-10).