TileRegionLoadOptions
extension TileRegionLoadOptions
-
Initializes a
TileRegionLoadOptions
, required forTileStore.loadTileRegion(forId:loadOptions:)
averageBytesPerSecond
is not a strict bandwidth limit, but only limits the average download speed. Tile regions may be temporarily downloaded with higher speed, then downloading will pause until the rolling average has dropped below this value.If
metadata
is not a valid JSON object, then this initializer returnsnil
.Declaration
Swift
public convenience init?(geometry: Geometry?, descriptors: [TilesetDescriptor], metadata: Any? = nil, acceptExpired: Bool = false, networkRestriction: NetworkRestriction = .none, averageBytesPerSecond: Int? = nil)
Parameters
geometry
The tile region’s associated geometry (optional).
descriptors
The tile region’s tileset descriptors.
metadata
A custom JSON value to be associated with this tile region.
tileLoadOptions
Restrict the tile region load request to the specified network types. If none of the specified network types is available, the load request fails with an error.
averageBytesPerSecond
Limits the download speed of the tile region.
-
Limits the download speed of the tile region.
Note that this is not a strict bandwidth limit, but only limits the average download speed. Tile regions may be temporarily downloaded with higher speed, then downloading will pause until the rolling average has dropped below this value.
If unspecified, the download speed will not be restricted.
Declaration
Swift
public var averageBytesPerSecond: Int? { get }
-
The geometry supported by these options.
Declaration
Swift
public var geometry: Geometry? { get }