MapOptions
public struct MapOptions
Allows the user to configure the initial parameters of the map.
Important
This is a Public Preview API. It may be changed or removed at any time.-
init(mapStyle:
mapKey: cameraUpdate: onlineCachePolicy: cachePolicy: styleMode: tileDataProvider: dataProviders: ) Creates a new instance with some optional parameters.
Declaration
Swift
public init( mapStyle: StyleContainer? = nil, mapKey: String, cameraUpdate: CameraUpdate? = nil, onlineCachePolicy: OnlineCachePolicy = .default, cachePolicy: StyleCachePolicy = .default, styleMode: StyleMode? = nil, tileDataProvider: MapTileDataProviding? = nil, dataProviders: [MapDisplayDataProvider]? = nil )
Parameters
mapStyle
StyleContainer
with availableStyleDefinition
‘s.mapKey
Key used for map initialization.
cameraUpdate
Provides initial
CameraUpdate
where zoom, tilt and rotation can be defined.cachePolicy
Provides a custom
ResourceCachePolicy
to use for style caching.onlineCachePolicy
Provides a custom
OnlineCachePolicy
to use for tile caching.styleMode
Provides an initial
StyleMode
to use during map initialization.tileDataProvider
Provider of map tile data
dataProviders
Custom data providers to provide data of map tiles.
-
Provides information about what main (usually light) and dark styles are defined. Each style is defined as a
StyleDefinition
.Declaration
Swift
public let mapStyle: StyleContainer?
-
Key used for map initialization.
Declaration
Swift
public let mapKey: String
-
Provides initial
CameraUpdate
where zoom, tilt and rotation can be defined.Declaration
Swift
public let cameraUpdate: CameraUpdate?
-
Provides a custom
StyleCachePolicy
to use for style caching (and tile caching if componetization is not enabled).Declaration
Swift
public let cachePolicy: StyleCachePolicy
-
Provides a custom
OnlineCachePolicy
to use for tile caching.Declaration
Swift
public let onlineCachePolicy: OnlineCachePolicy
-
Provides an initial
StyleMode
to use during map initialization. If nothing is provided,StyleMode.main
will be usedDeclaration
Swift
public let styleMode: StyleMode?
-
Map tile provider interface for map display.
Declaration
Swift
public let tileDataProvider: MapTileDataProviding?
-
List of custom MapDisplayDataProviders.
Declaration
Swift
public let dataProviders: [MapDisplayDataProvider]?