SparseSpatialMapManager Class

Description

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

isAvailable

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

C

bool easyar_SparseSpatialMapManager_isAvailable(void)

C++17

static bool isAvailable()

C++03(Deprecated)

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++17

static std::shared_ptr<SparseSpatialMapManager> create()

C++03(Deprecated)

static void create(SparseSpatialMapManager * * Return)

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_CallbackScheduler * callbackScheduler, easyar_FunctorOfVoidFromBoolAndStringAndString onCompleted)

C++17

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::shared_ptr<CallbackScheduler> callbackScheduler, std::function<void(bool, std::string, std::string)> onCompleted)

C++03(Deprecated)

void host(SparseSpatialMap * mapBuilder, String * apiKey, String * apiSecret, String * sparseSpatialMapAppId, String * name, Image * preview, CallbackScheduler * callbackScheduler, FunctorOfVoidFromBoolAndStringAndString 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, @Nonnull CallbackScheduler callbackScheduler, @Nonnull FunctorOfVoidFromBoolAndStringAndString onCompleted)

Kotlin

fun host(mapBuilder: SparseSpatialMap, apiKey: String, apiSecret: String, sparseSpatialMapAppId: String, name: String, preview: Image?, 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 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?, _ 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, 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_CallbackScheduler * callbackScheduler, easyar_FunctorOfVoidFromBoolAndString onCompleted)

C++17

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

C++03(Deprecated)

void load(SparseSpatialMap * mapTracker, String * serverMapId, String * apiKey, String * apiSecret, String * sparseSpatialMapAppId, CallbackScheduler * callbackScheduler, FunctorOfVoidFromBoolAndString 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, @Nonnull CallbackScheduler callbackScheduler, @Nonnull FunctorOfVoidFromBoolAndString onCompleted)

Kotlin

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

Objective-C

- (void)load:(easyar_SparseSpatialMap *)mapTracker serverMapId:(NSString *)serverMapId apiKey:(NSString *)apiKey apiSecret:(NSString *)apiSecret sparseSpatialMapAppId:(NSString *)sparseSpatialMapAppId 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, _ callbackScheduler: CallbackScheduler, _ onCompleted: @escaping (Bool, String) -> Void) -> Void

C#

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

clear

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

C

void easyar_SparseSpatialMapManager_clear(easyar_SparseSpatialMapManager * This)

C++17

void clear()

C++03(Deprecated)

void clear()

Java

public void clear()

Kotlin

fun clear(): Unit

Objective-C

- (void)clear

Swift

public func clear() -> Void

C#

public virtual void clear()