ExternalMapDataSource
@available(*, deprecated, message: "Will be removed in v4.25.0. Please use ExternalMapDataSourceClient and ExternalMapDataSourceServer classes respectively.")
public class ExternalMapDataSource
extension ExternalMapDataSource: NativeBase
extension ExternalMapDataSource: Hashable
Factory class to configure SDK with external map data source. By “external map data source” we mean the map data service that is connected under the hood by our internal OCM Access Manager (OCM AM). This feature can help to share data with multiple user profiles on the same device. Note that this feature requires an advanced set-up. In case of doubt, please contact your HERE representative.
Usage example:
Note: This is a beta release of this feature, so there could be a few bugs and unexpected behaviors. Related APIs may change for new releases without a deprecation process.
-
Initialize
SDKNativeEnginewith URL of the remote map data source gRPC server. Newly injected map data source replaces exiting one ifSDKNativeEnginewas already connected. Suggested configuration is taken fromSDKOptions.catalogConfigurations, actual catalog versions are queried from the remote connection in order to be in sync.Throws
ExternalMapDataSourceExceptionErrorIndicates what went wrong when initialization of SDK with external map data source was attempted.Declaration
Swift
public static func configureSdkEngineWithAutoRemoteConnection(url: String, engine: SDKNativeEngine) throwsParameters
urlURL to connect with the remote map data source gRPC server. The remote map data source gRPC server could be self managed service created with help OCM Access Manager (OCM AM) or service exposed using
ExternalMapDataSource.start(String, SDKNativeEngine, SslServerCredentialsOptions?)engineInstance of an existing
SDKNativeEngine. -
Initialize
SDKNativeEnginewith URL of the remote map data source gRPC server. Newly injected map data source replaces exiting one ifSDKNativeEnginewas already connected. Suggested configuration is taken fromSDKOptions.catalogConfigurations, actual catalog versions are queried from the remote connection in order to be in sync.Throws
ExternalMapDataSourceExceptionErrorIndicates what went wrong when initialization of SDK with external map data source was attempted.Declaration
Swift
public static func configureSdkEngineWithAutoRemoteConnectionSsl(url: String, engine: SDKNativeEngine, credentials: SslClientCredentialsOptions?) throwsParameters
urlURL to connect with the remote map data source gRPC server. The remote map data source gRPC server could be self managed service created with help OCM Access Manager (OCM AM) or service exposed using
ExternalMapDataSource.start(String, SDKNativeEngine, SslServerCredentialsOptions?)engineInstance of an existing
SDKNativeEngine.credentialsInstance of
SslClientCredentialsOptions -
Initialize
SDKNativeEnginewith URL of the remote map data source gRPC server. Newly injected map data source replaces exiting one ifSDKNativeEnginewas already connected. Overrides automatic version resolution, in favour of explicitly passed one.Throws
ExternalMapDataSourceExceptionErrorIndicates what went wrong when initialization of SDK with external map data source was attempted.Declaration
Swift
public static func configureSdkEngineWithFixedRemoteConnection(url: String, catalogConfigs: [CatalogIdentifier], engine: SDKNativeEngine) throwsParameters
urlURL to connect with the remote map data source gRPC server. The remote map data source gRPC server could be self managed service created with help OCM Access Manager (OCM AM) or service exposed using
ExternalMapDataSource.start(String, SDKNativeEngine, SslServerCredentialsOptions?)catalogConfigsList of
CatalogIdentifierwith HRNs and corresponding catalog versions. The same catalogs must be added to theDataStoreServerinstance on the server side. Otherwise, theDataStoreClientinstance will not be able to load data from the catalog. In this case function will throwExternalMapDataSourceException.ADD_CATALOG_ERROR.engineInstance of an existing
SDKNativeEngine. -
Initialize
SDKNativeEnginewith URL of the remote map data source gRPC server. Newly injected map data source replaces exiting one ifSDKNativeEnginewas already connected. Overrides automatic version resolution, in favour of explicitly passed one.Throws
ExternalMapDataSourceExceptionErrorIndicates what went wrong when initialization of SDK with external map data source was attempted.Declaration
Swift
public static func configureSdkEngineWithFixedRemoteConnectionSsl(url: String, catalogConfigs: [CatalogIdentifier], engine: SDKNativeEngine, credentials: SslClientCredentialsOptions?) throwsParameters
urlURL to connect with the remote map data source gRPC server. The remote map data source gRPC server could be self managed service created with help OCM Access Manager (OCM AM) or service exposed using
ExternalMapDataSource.start(String, SDKNativeEngine, SslServerCredentialsOptions?)catalogConfigsList of
CatalogIdentifierwith HRNs and corresponding catalog versions. The same catalogs must be added to theDataStoreServerinstance on the server side. Otherwise, theDataStoreClientinstance will not be able to load data from the catalog. In this case function will throwExternalMapDataSourceException.ADD_CATALOG_ERROR.engineInstance of an existing
SDKNativeEngine.credentialsInstance of
SslClientCredentialsOptions -
Exposes map data source as GRPC service on given url for
SDKNativeEngine. The exposed service can be consumed with the help ofExternalMapDataSource.configureSdkEngineWithAutoRemoteConnection(...)orExternalMapDataSource.configureSdkEngineWithFixedRemoteConnection(...)Note: This is a beta release of this feature, so there could be a few bugs and unexpected behaviors. Related APIs may change for new releases without a deprecation process.
Throws
ExternalMapDataSourceExceptionErrorIndicates what went wrong when trying to expose external map data source.Declaration
Swift
public static func start(url: String, engine: SDKNativeEngine) throws -> ExternalMapDataSourceParameters
urlURL in the ‘ip_address:port’ format. Address will be used to bind to the GRPC server.
engineInstance of an existing
SDKNativeEngine.Return Value
An object to control the lifetime of the server.
-
Exposes map data source as GRPC service on given url for
SDKNativeEngine. The exposed service can be consumed with the help ofExternalMapDataSource.configureSdkEngineWithAutoRemoteConnection(...)orExternalMapDataSource.configureSdkEngineWithFixedRemoteConnection(...)Note: This is a beta release of this feature, so there could be a few bugs and unexpected behaviors. Related APIs may change for new releases without a deprecation process.
Throws
ExternalMapDataSourceExceptionErrorIndicates what went wrong when trying to expose external map data source.Declaration
Swift
public static func start(url: String, engine: SDKNativeEngine, serviceCredential: SslServerCredentialsOptions?) throws -> ExternalMapDataSourceParameters
urlURL in the ‘ip_address:port’ format. Address will be used to bind to the GRPC server.
engineInstance of an existing
SDKNativeEngine.serviceCredentialInstance of
SslServerCredentialsOptionsReturn Value
An object to control the lifetime of the server.
-
Stops the exposed map data source GRPC service started using
ExternalMapDataSource.start(String, SDKNativeEngine, SslServerCredentialsOptions?).Note: This is a beta release of this feature, so there could be a few bugs and unexpected behaviors. Related APIs may change for new releases without a deprecation process.
Throws
ExternalMapDataSourceExceptionErrorIndicates what went wrong when trying to stop exposed external map data source service.Declaration
Swift
public func stop(engine: SDKNativeEngine) throwsParameters
engineInstance of an existing
SDKNativeEngine.