TilesetDescriptorOptionsForTilesets
extension TilesetDescriptorOptionsForTilesets
-
Initializes a
TilesetDescriptorOptionsForTilesetswhich is used in the creation of aTilesetDescriptor.Note
The implementation loads and stores the loaded tiles in batches, each batch has a pre-defined zoom range and it contains all child tiles within the range. The zoom leveling scheme for the tile batches can be defined in Tile JSON, otherwise the default scheme is used:
Global coverage: 0 - 5
Regional information: 6 - 10
Local information: 11 - 14
Streets detail: 15 - 16
Internally, the implementation maps the given tile pack zoom range and geometry to a set of pre-defined batches to load, therefore it is highly recommended to choose the
minZoomandmaxZoomvalues in accordance with the tile batches zoom ranges (see the list above).Declaration
Swift
public convenience init(tilesets: [String], zoomRange: ClosedRange<UInt8>, pixelRatio: Float = Float(UIScreen.main.scale))Parameters
tilesetsThe tilesets associated with the tileset descriptor. An array, each element of which must be either a URI to a TileJSON resource or a JSON string representing the inline tileset. The provided URIs must have “mapbox://” scheme, e.g. “mapbox://mapbox.mapbox-streets-v8”.
zoomRangeClosed range zoom level for the tile package.
pixelRatioPixel ratio to be accounted for when downloading raster tiles. Typically this should match the scale used by the
MapView, most likelyUIScreen.main.scale, which is the default value.
TilesetDescriptorOptionsForTilesets Extension Reference