SparseSpatialMapManager Class

Description

SparseSpatialMap manager class, for managing sharing.

isAvailable

Check whether SparseSpatialMapManager is is available. It returns true when the operating system is Windows, Mac, iOS or Android.

C

bool easyar_SparseSpatialMapManager_isAvailable(void)

C++

static bool isAvailable()

Java

public static boolean isAvailable()

Kotlin

companion object fun isAvailable(): Boolean

Objective-C

+ (bool)isAvailable

Swift

public static func isAvailable() -> Bool

C#

public static bool isAvailable()

create

Creates an instance.

C

void easyar_SparseSpatialMapManager_create(easyar_SparseSpatialMapManager * * Return)

C++

static std::shared_ptr<SparseSpatialMapManager> create()

Java

public static @Nonnull SparseSpatialMapManager create()

Kotlin

companion object fun create(): SparseSpatialMapManager

Objective-C

+ (easyar_SparseSpatialMapManager *)create

Swift

public static func create() -> SparseSpatialMapManager

C#

public static SparseSpatialMapManager create()

host

Creates a map from SparseSpatialMap and upload it to EasyAR cloud servers. After completion, a serverMapId will be returned for loading map from EasyAR cloud servers.

C

void easyar_SparseSpatialMapManager_host(easyar_SparseSpatialMapManager * This, easyar_SparseSpatialMap * mapBuilder, easyar_String * apiKey, easyar_String * apiSecret, easyar_String * sparseSpatialMapAppId, easyar_String * name, easyar_OptionalOfImage preview, easyar_OptionalOfInt timeoutMilliseconds, easyar_CallbackScheduler * callbackScheduler, easyar_FunctorOfVoidFromBoolAndStringAndString onCompleted)

C++

void host(std::shared_ptr<SparseSpatialMap> mapBuilder, std::string apiKey, std::string apiSecret, std::string sparseSpatialMapAppId, std::string name, std::optional<std::shared_ptr<Image>> preview, std::optional<int> timeoutMilliseconds, std::shared_ptr<CallbackScheduler> callbackScheduler, std::function<void(bool, std::string, std::string)> onCompleted)

Java

public void host(@Nonnull SparseSpatialMap mapBuilder, java.lang.@Nonnull String apiKey, java.lang.@Nonnull String apiSecret, java.lang.@Nonnull String sparseSpatialMapAppId, java.lang.@Nonnull String name, @Nullable Image preview, java.lang.@Nullable Integer timeoutMilliseconds, @Nonnull CallbackScheduler callbackScheduler, @Nonnull FunctorOfVoidFromBoolAndStringAndString onCompleted)

Kotlin

fun host(mapBuilder: SparseSpatialMap, apiKey: String, apiSecret: String, sparseSpatialMapAppId: String, name: String, preview: Image?, timeoutMilliseconds: Int?, callbackScheduler: CallbackScheduler, onCompleted: FunctorOfVoidFromBoolAndStringAndString): Unit

Objective-C

- (void)host:(easyar_SparseSpatialMap *)mapBuilder apiKey:(NSString *)apiKey apiSecret:(NSString *)apiSecret sparseSpatialMapAppId:(NSString *)sparseSpatialMapAppId name:(NSString *)name preview:(easyar_Image *)preview timeoutMilliseconds:(NSNumber *)timeoutMilliseconds callbackScheduler:(easyar_CallbackScheduler *)callbackScheduler onCompleted:(void (^)(bool isSuccessful, NSString * serverMapId, NSString * error))onCompleted

Swift

public func host(_ mapBuilder: SparseSpatialMap, _ apiKey: String, _ apiSecret: String, _ sparseSpatialMapAppId: String, _ name: String, _ preview: Image?, _ timeoutMilliseconds: Int32?, _ callbackScheduler: CallbackScheduler, _ onCompleted: @escaping (Bool, String, String) -> Void) -> Void

C#

public virtual void host(SparseSpatialMap mapBuilder, string apiKey, string apiSecret, string sparseSpatialMapAppId, string name, Optional<Image> preview, Optional<int> timeoutMilliseconds, CallbackScheduler callbackScheduler, Action<bool, string, string> onCompleted)

load

Loads a map from EasyAR cloud servers by serverMapId. To unload the map, call SparseSpatialMap.unloadMap with serverMapId.

C

void easyar_SparseSpatialMapManager_load(easyar_SparseSpatialMapManager * This, easyar_SparseSpatialMap * mapTracker, easyar_String * serverMapId, easyar_String * apiKey, easyar_String * apiSecret, easyar_String * sparseSpatialMapAppId, easyar_OptionalOfInt timeoutMilliseconds, easyar_CallbackScheduler * callbackScheduler, easyar_FunctorOfVoidFromBoolAndString onCompleted)

C++

void load(std::shared_ptr<SparseSpatialMap> mapTracker, std::string serverMapId, std::string apiKey, std::string apiSecret, std::string sparseSpatialMapAppId, std::optional<int> timeoutMilliseconds, std::shared_ptr<CallbackScheduler> callbackScheduler, std::function<void(bool, std::string)> onCompleted)

Java

public void load(@Nonnull SparseSpatialMap mapTracker, java.lang.@Nonnull String serverMapId, java.lang.@Nonnull String apiKey, java.lang.@Nonnull String apiSecret, java.lang.@Nonnull String sparseSpatialMapAppId, java.lang.@Nullable Integer timeoutMilliseconds, @Nonnull CallbackScheduler callbackScheduler, @Nonnull FunctorOfVoidFromBoolAndString onCompleted)

Kotlin

fun load(mapTracker: SparseSpatialMap, serverMapId: String, apiKey: String, apiSecret: String, sparseSpatialMapAppId: String, timeoutMilliseconds: Int?, callbackScheduler: CallbackScheduler, onCompleted: FunctorOfVoidFromBoolAndString): Unit

Objective-C

- (void)load:(easyar_SparseSpatialMap *)mapTracker serverMapId:(NSString *)serverMapId apiKey:(NSString *)apiKey apiSecret:(NSString *)apiSecret sparseSpatialMapAppId:(NSString *)sparseSpatialMapAppId timeoutMilliseconds:(NSNumber *)timeoutMilliseconds callbackScheduler:(easyar_CallbackScheduler *)callbackScheduler onCompleted:(void (^)(bool isSuccessful, NSString * error))onCompleted

Swift

public func load(_ mapTracker: SparseSpatialMap, _ serverMapId: String, _ apiKey: String, _ apiSecret: String, _ sparseSpatialMapAppId: String, _ timeoutMilliseconds: Int32?, _ callbackScheduler: CallbackScheduler, _ onCompleted: @escaping (Bool, String) -> Void) -> Void

C#

public virtual void load(SparseSpatialMap mapTracker, string serverMapId, string apiKey, string apiSecret, string sparseSpatialMapAppId, Optional<int> timeoutMilliseconds, CallbackScheduler callbackScheduler, Action<bool, string> onCompleted)

clear

Clears allocated cache space.

C

void easyar_SparseSpatialMapManager_clear(easyar_SparseSpatialMapManager * This)

C++

void clear()

Java

public void clear()

Kotlin

fun clear(): Unit

Objective-C

- (void)clear

Swift

public func clear() -> Void

C#

public virtual void clear()