MapContext
public class MapContext
extension MapContext: NativeBase
extension MapContext: Hashable
MapContext is the rendering engine and the context in which virtual geographic maps get rendered.
It runs the render loop or offers the means for the user to run a custom one.
Data sources, assets and virtual maps can be attached to the context. A virtual map can only render data from sources attached to the same context.
The graphics backend to be used by the engine can be choosen by the user or a platform suitable one can be automatically selected internally. Only one graphics backend can be active and once selected it cannot be changed.
-
Completion handler for the memory management result.
Note: This is a beta release of this feature, so there could be a few bugs and unexpected behavior. Related APIs may change for new releases without a deprecation process.
Declaration
Swift
public typealias SetMemoryManagementOptionsCompletionHandler = (_ result: MapContext.MemoryManagementResult) -> VoidParameters
resultThe memory management result.
-
The memory management strategy. Note: This is a beta release of this feature, so there could be a few bugs and unexpected behavior. Related APIs may change for new releases without a deprecation process.
See moreDeclaration
Swift
public enum MemoryManagementStrategy : UInt32, CaseIterable, Codable -
The memory management result code.
Note: This is a beta release of this feature, so there could be a few bugs and unexpected behavior. Related APIs may change for new releases without a deprecation process.
See moreDeclaration
Swift
public enum MemoryManagementResultCode : UInt32, CaseIterable, Codable -
Types of system resources used by
See moreMapContextor any of the entities attached to it, likeHereMap.Declaration
Swift
public enum ResourceType : UInt32, CaseIterable, Codable -
The severity of a free resource request.
See moreDeclaration
Swift
public enum FreeResourceSeverity : UInt32, CaseIterable, Codable -
Memory management result.
Note: This is a beta release of this feature, so there could be a few bugs and unexpected behavior. Related APIs may change for new releases without a deprecation process.
See moreDeclaration
Swift
public struct MemoryManagementResult -
Memory management options.
Note: This is a beta release of this feature, so there could be a few bugs and unexpected behavior. Related APIs may change for new releases without a deprecation process.
See moreDeclaration
Swift
public struct MemoryManagementOptions -
Frees a system resource held by the
MapContextand all entities attached to it, likeHereMap. This function is intended for use when a system resource availability becomes low. For example, some memory can be freed when the application transitions to the background state.Declaration
Swift
public func freeResource(type: MapContext.ResourceType, severity: MapContext.FreeResourceSeverity)Parameters
typeType of resource to be freed.
severitySeverity of the request.
-
Declaration
Swift
public func getMemoryManagementOptions() -> MapContext.MemoryManagementOptionsReturn Value
Gets the current memory management options. Returns the actual applied memory limits. If the underlying system limits exceed int32_t max value (2,147,483,647 KiB or ~2 TiB), the returned value is clamped to int32_t max.
Note: This is a beta release of this feature, so there could be a few bugs and unexpected behavior. Related APIs may change for new releases without a deprecation process.
-
Sets memory management options for controlling tile cache and video memory usage. In
MapContext.MemoryManagementOptionsoptional parameters withnilor non positive values will be ignored, preserving their existing settings.Note: This is a beta release of this feature, so there could be a few bugs and unexpected behavior. Related APIs may change for new releases without a deprecation process.
Declaration
Swift
public func setMemoryManagementOptions(_ memoryManagementOptions: MapContext.MemoryManagementOptions, completion: MapContext.SetMemoryManagementOptionsCompletionHandler?)Parameters
memoryManagementOptionsThe memory management options to set.
completionOptional handler used upon completion to pass the return value to the caller.