MapOptions
public class MapOptions : NSObject
Allows the user to configure the initial parameters of the map.
-
Creates an instance with some optional parameters.
Declaration
Swift
public init( mapStyle: StyleContainer? = nil, apiKey: String, cameraUpdate: CameraUpdate? = nil, onlineCachePolicy: OnlineCachePolicy = .default, cachePolicy: OnDiskCachePolicy = .default, styleMode: StyleMode? = nil )
Parameters
mapStyle
StyleContainer
with availableStyleDefinition
‘s.apiKey
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. -
Creates an instance with some optional parameters.
Declaration
Swift
public init( mapStyle: StyleContainer? = nil, apiKey: String, cameraUpdate: CameraUpdate? = nil, onlineCachePolicy: OnlineCachePolicy = .default, cachePolicy: OnDiskCachePolicy = .default, styleMode: StyleMode? = nil, dataProviders: [MapDisplayDataProvider]? = nil )
Parameters
mapStyle
StyleContainer
with availableStyleDefinition
‘s.apiKey
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.dataProviders
Custom data providers to provide data of map tiles.
Important
This is a Public Preview API. It may be changed or removed at any time.
-
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 apiKey: String
-
Provides initial
CameraUpdate
where zoom, tilt and rotation can be defined.Declaration
Swift
public let cameraUpdate: CameraUpdate?
-
Provides a custom
OnDiskCachePolicy
to use for tile caching if componetization is disabled.Declaration
Swift
public let cachePolicy: OnDiskCachePolicy
-
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?
-
List of custom MapDisplayDataProviders.
Important
This is a Public Preview API. It may be changed or removed at any time.Declaration
Swift
public let dataProviders: [MapDisplayDataProvider]?