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.-
Creates a new instance with some optional parameters.
Declaration
Swift
public init( mapStyle: StyleContainer? = nil, mapKey: String, cameraOptions: CameraOptions? = nil, cachePolicy: ResourceCachePolicy = .default, styleMode: StyleMode? = nil, tileDataProvider: MapTileDataProvider? = nil )
Parameters
mapStyle
StyleContainer
with availableStyleDefinition
‘s.mapKey
Key used for map initialization.
cameraOptions
Provides initial
CameraOptions
where zoom, tilt and rotation can be defined.cachePolicy
Provides a custom
ResourceCachePolicy
to use for style caching and tiles.styleMode
Provides an initial
StyleMode
to use during map initialization.tileDataProvider
Provider of map tile data
-
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
CameraOptions
where zoom, tilt and rotation can be defined.Declaration
Swift
public let cameraOptions: CameraOptions?
-
Provides a custom
ResourceCachePolicy
to use for style and tiles caching.Declaration
Swift
public let cachePolicy: ResourceCachePolicy
-
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: MapTileDataProvider?