SparseSpatialMapManager Class

Description

SparseSpatialMap 管理类,用于管理 SparseSpatialMap 的分享功能。

isAvailable

检查SparseSpatialMapManager是否可用。当运行的操作系统为Windows, Mac, iOS或Android时返回true。

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

创建。

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

SparseSpatialMap 创建地图并上传到EasyAR云服务器以进行分享。创建成功时会获得用于从EasyAR云服务器加载地图的serverMapId。

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

使用serverMapId从EasyAR云服务器加载地图到 SparseSpatialMap 中。可以调用 SparseSpatialMap.unloadMap 并传入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

清除已占用的缓存数据空间。

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()