NDSStoreUpdateConfig
public struct NDSStoreUpdateConfig
Configuration of updates of the NDSStore
.
Important
This is a Public Preview API. It may be changed or removed at any time.-
init(updateStoragePath:
persistentStoragePath: updateServerURL: updateServerAPIKey: iqMapsAllRegionsEnabled: iqMapsRelevantRegionsEnabled: iqMapsRelevantRegionsRadius: iqMapsRelevantRegionsUpdateInterval: iqMapsRegionsAlongRouteEnabled: iqMapsRegionsAlongRouteRadius: geopoliticalView: locale: backgroundDownloadsEnabled: ) Creates an instance of
NDSStoreUpdateConfig
Declaration
Swift
public init( updateStoragePath: String, persistentStoragePath: String, updateServerURL: URL? = nil, updateServerAPIKey: String? = nil, iqMapsAllRegionsEnabled: Bool = false, iqMapsRelevantRegionsEnabled: Bool = false, iqMapsRelevantRegionsRadius: Measurement<UnitLength> = .tt.meters(0), iqMapsRelevantRegionsUpdateInterval: Measurement<UnitDuration> = .tt.minutes(0), iqMapsRegionsAlongRouteEnabled: Bool = false, iqMapsRegionsAlongRouteRadius: Measurement<UnitLength> = .tt.meters(0), geopoliticalView: String? = nil, locale: Locale = NDSStoreUpdateConfig.currentLocale, backgroundDownloadsEnabled: Bool = false )
-
The local path to the update packages directory. The directory provided must be writable.
After a successful update of an update region, all update files for that update region are deleted.
Free disk space is required to download and install updates, and to perform optimizations on the map. If not enough space is available to download and install, then nothing is downloaded.
Declaration
Swift
public var updateStoragePath: String
-
The path to the persistent directory for map updates.
For some functionality (e.g. recovery from unexpected failures) data may have to be persisted at this location.
Declaration
Swift
public var persistentStoragePath: String
-
The URL of the server to download updates from.
Defaults to the TomTom production update server.
Declaration
Swift
public var updateServerURL: URL?
-
The API key used for requests to the map updates server that was specified in
updateServerURL
.If not specified, the key parameter will not be present in requests.
Declaration
Swift
public var updateServerAPIKey: String?
-
Indicates if the automatic update is enabled for all regions in the map.
Update regions will not be updated in any specific order.
Declaration
Swift
public var iqMapsAllRegionsEnabled: Bool
-
Indicates if the automatic update within the radius around current position is enabled.
If enabled, the radius should be specified in
iqMapsRelevantRegionsRadius
.Additionally, it is possible to configure periodic updates via
iqMapsRelevantRegionsUpdateInterval
.Update regions will not be updated in any specific order.
Declaration
Swift
public var iqMapsRelevantRegionsEnabled: Bool
-
Indicates the distance within which regions around the current position would be considered for an update.
This is only used when
iqMapsRelevantRegionsEnabled
is enabled.Note: Must not be negative. Note: Radius is rounded to the nearest meter.
Declaration
Swift
public var iqMapsRelevantRegionsRadius: Measurement<UnitLength>
-
Indicates the time interval at which relevant regions will be updated.
This is only used when
iqMapsRelevantRegionsEnabled
is enabled.Value of 0 means that periodic updates are disabled.
Note: Must not be negative. Note: Interval is rounded to the nearest minute.
Declaration
Swift
public var iqMapsRelevantRegionsUpdateInterval: Measurement<UnitDuration>
-
Indicates if the automatic update of regions in a given distance to the current active route is enabled.
If enabled, the distance should be specified using
iqMapsRegionsAlongRouteRadius
.Declaration
Swift
public var iqMapsRegionsAlongRouteEnabled: Bool
-
Set the distance within which regions around the current route would be considered for an update.
Note: Must not be negative. Note: Radius is rounded to the nearest meter.
Declaration
Swift
public var iqMapsRegionsAlongRouteRadius: Measurement<UnitLength>
-
Set the country whose view on disputant areas should be used.
Only the update regions belonging to the chosen geopolitical view are subject to updates.
The value must be a country specifier in ISO 3166-1 alpha-2 form (e.g. “TR”).
If not provided or there is no special view defined in the map for the given country, the international geopolitical view will be used.
Declaration
Swift
public var geopoliticalView: String?
-
Set the locale. The language of the locale will be considered for names of map regions in region graph.
If the map does not support the language, the best matched language in the map will be used.
Declaration
Swift
public var locale: Locale
-
Returns a locale to be used by
NDSStore
Declaration
Swift
public static var currentLocale: Locale { get }