LandmarkStoreContext

Objective-C


@interface LandmarkStoreContext : NSObject

Swift

class LandmarkStoreContext : NSObject

This class encapsulates landmark store context information.

  • Initializes and returns a newly allocated object using the store name.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithName:(nonnull NSString *)name;

    Swift

    init(name: String)
  • Initializes and returns a newly allocated object using the store identifier.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithIdentifier:(int)identifier;

    Swift

    init(identifier: Int32)
  • Add a new category to the store. After this method call, the category object that is passed as a parameter belongs to this landmark store. The category must have a name.

    Declaration

    Objective-C

    - (void)addCategory:(nonnull LandmarkCategoryObject *)category;

    Swift

    func addCategory(_ category: LandmarkCategoryObject)
  • Update the specified category. The category object must belong to this landmark store.

    Declaration

    Objective-C

    - (BOOL)updateCategory:(nonnull LandmarkCategoryObject *)category;

    Swift

    func updateCategory(_ category: LandmarkCategoryObject) -> Bool
  • Remove the specified category. @details The landmarks belonging to the category are marked uncategorized.

    Declaration

    Objective-C

    - (BOOL)removeCategory:(nonnull LandmarkCategoryObject *)category;

    Swift

    func removeCategory(_ category: LandmarkCategoryObject) -> Bool
  • Remove the specified category. @details The landmarks belonging to the category are removed.

    Declaration

    Objective-C

    - (BOOL)removeCategoryWithAllContent:(nonnull LandmarkCategoryObject *)category;

    Swift

    func removeCategory(withAllContent category: LandmarkCategoryObject) -> Bool
  • Returns the specified landmark category, if available.

    Declaration

    Objective-C

    - (nullable LandmarkCategoryObject *)getCategoryById:(int)categoryId;

    Swift

    func getCategoryById(_ categoryId: Int32) -> LandmarkCategoryObject?
  • Add landmark in the landmark store. The landmark will be added as uncategorized. @param[in]landmark The landmark object.

    Declaration

    Objective-C

    - (BOOL)addLandmark:(nonnull LandmarkObject *)landmark;

    Swift

    func addLandmark(_ landmark: LandmarkObject) -> Bool

    Return Value

    Operation with success.

  • Update the information about a landmark. @details This updates only the information about a landmark and does not modify the categories the landmark belongs to. @details The landmark instance passed in as the parameter must be an instance that belongs to this landmark store. @details Calling this method updates the timestamp of the landmark. @param[in]landmark The landmark object.

    Declaration

    Objective-C

    - (BOOL)updateLandmark:(nonnull LandmarkObject *)landmark;

    Swift

    func updateLandmark(_ landmark: LandmarkObject) -> Bool

    Return Value

    Operation with success.

  • Remove the specified landmark from the landmark store. @param[in]landmark The landmark object.

    Declaration

    Objective-C

    - (BOOL)removeLandmark:(nonnull LandmarkObject *)landmark;

    Swift

    func removeLandmark(_ landmark: LandmarkObject) -> Bool

    Return Value

    Operation with success.

  • Remove all landmarks from the landmark store.

    Declaration

    Objective-C

    - (void)removeAllLandmarks;

    Swift

    func removeAllLandmarks()
  • Add a landmark to the specified category in the landmark store. @param[in]landmark The landmark object. @param[in]categoryId The ID of the category.

    Declaration

    Objective-C

    - (BOOL)addLandmark:(nonnull LandmarkObject *)landmark
           toCategoryId:(int)categoryId;

    Swift

    func addLandmark(_ landmark: LandmarkObject, toCategoryId categoryId: Int32) -> Bool

    Return Value

    Operation with success.

  • Remove the specified landmark from the specified category. @param[in]landmark The landmark object. @param[in]categoryId The ID of the category.

    Declaration

    Objective-C

    - (BOOL)removeLandmark:(nonnull LandmarkObject *)landmark
            fromCategoryId:(int)categoryId;

    Swift

    func removeLandmark(_ landmark: LandmarkObject, fromCategoryId categoryId: Int32) -> Bool

    Return Value

    Operation with success.

  • Remove all landmarks from the specified category. @param[in]categoryId The ID of the category.

    Declaration

    Objective-C

    - (void)removeAllLandmarksFromCategoryId:(int)categoryId;

    Swift

    func removeAllLandmarks(fromCategoryId categoryId: Int32)
  • Returns the ID of the landmark store.

    Declaration

    Objective-C

    - (int)getId;

    Swift

    func getId() -> Int32
  • Returns the type of the landmark store.

    Declaration

    Objective-C

    - (LandmarkStoreType)getType;

    Swift

    func getType() -> LandmarkStoreType
  • Returns the landmark store name.

    Declaration

    Objective-C

    - (nonnull NSString *)getName;

    Swift

    func getName() -> String
  • Returns the landmark store file path.

    Declaration

    Objective-C

    - (nonnull NSString *)getFilePath;

    Swift

    func getFilePath() -> String
  • Returns the list of all categories.

    Declaration

    Objective-C

    - (nonnull NSArray<LandmarkCategoryObject *> *)getCategories;

    Swift

    func getCategories() -> [LandmarkCategoryObject]
  • Returns the specified landmark, if available. @param[in]landmarkId The landmark identifier.

    Declaration

    Objective-C

    - (nullable LandmarkObject *)getLandmark:(int)landmarkId;

    Swift

    func getLandmark(_ landmarkId: Int32) -> LandmarkObject?
  • Returns the number of all landmarks from the landmark store.

    Declaration

    Objective-C

    - (int)getLandmarkCount;

    Swift

    func getLandmarkCount() -> Int32
  • Returns the landmarks from the landmark store.

    Declaration

    Objective-C

    - (nonnull NSArray<LandmarkObject *> *)getLandmarks;

    Swift

    func getLandmarks() -> [LandmarkObject]
  • Returns the number of all landmarks within the specified category. @param[in]categoryId The ID of the category.

    Declaration

    Objective-C

    - (int)getLandmarkCount:(int)categoryId;

    Swift

    func getLandmarkCount(_ categoryId: Int32) -> Int32
  • Returns the landmarks within the specified category. @param[in]categoryId The ID of the category.

    Declaration

    Objective-C

    - (nonnull NSArray<LandmarkObject *> *)getLandmarks:(int)categoryId;

    Swift

    func getLandmarks(_ categoryId: Int32) -> [LandmarkObject]
  • Returns the landmarks within the specified rectangle geographic area. @param[in]rectangleArea The geographic area.

    Declaration

    Objective-C

    - (nonnull NSArray<LandmarkObject *> *)getLandmarksWithRectangleGeographicArea:
        (nonnull RectangleGeographicAreaObject *)rectangleArea;

    Swift

    func getLandmarksWithRectangleGeographicArea(_ rectangleArea: RectangleGeographicAreaObject) -> [LandmarkObject]
  • Returns the landmarks within the specified rectangle geographic area.

    Declaration

    Objective-C

    - (nonnull NSArray<LandmarkObject *> *)
        getLandmarksWithRectangleGeographicArea:
            (nonnull RectangleGeographicAreaObject *)rectangleArea
                                     categoryId:(int)categoryId;

    Swift

    func getLandmarksWithRectangleGeographicArea(_ rectangleArea: RectangleGeographicAreaObject, categoryId: Int32) -> [LandmarkObject]

    Parameters

    rectangleArea

    The geographic area.

    categoryId

    The category id for which landmarks are retrieved.

  • Returns the landmarks within the specified geographic area. @param[in]geographicArea The geographic area.

    Declaration

    Objective-C

    - (nonnull NSArray<LandmarkObject *> *)getLandmarksWithGeographicArea:
        (nonnull GeographicAreaObject *)geographicArea;

    Swift

    func getLandmarksWithGeographicArea(_ geographicArea: GeographicAreaObject) -> [LandmarkObject]
  • Returns the landmarks within the specified geographic area. @param[in]geographicArea The geographic area.

    Declaration

    Objective-C

    - (nonnull NSArray<LandmarkObject *> *)
        getLandmarksWithGeographicArea:
            (nonnull GeographicAreaObject *)geographicArea
                            categoryId:(int)categoryId;

    Swift

    func getLandmarksWithGeographicArea(_ geographicArea: GeographicAreaObject, categoryId: Int32) -> [LandmarkObject]

    Parameters

    categoryId

    The category id for which landmarks are retrieved.

  • Async import landmarks from given file format.

    Declaration

    Objective-C

    - (void)importLandmarks:(nonnull NSString *)filePath
                     format:(LandmarkImportFileFormat)format
          completionHandler:(nonnull void (^)(SDKErrorCode))handler;

    Swift

    func importLandmarks(_ filePath: String, format: LandmarkImportFileFormat) async -> SDKErrorCode

    Parameters

    path

    The file path.

    format

    The file format.

    handler

    The operation completion handler.

  • Async import landmarks from given file format.

    Declaration

    Objective-C

    - (void)importLandmarks:(nonnull NSString *)filePath
                     format:(LandmarkImportFileFormat)format
            progressHandler:(nonnull void (^)(float))progressHandler
          completionHandler:(nonnull void (^)(SDKErrorCode))completionHandler;

    Swift

    func importLandmarks(_ filePath: String, format: LandmarkImportFileFormat, progressHandler: @escaping (Float) -> Void) async -> SDKErrorCode

    Parameters

    path

    The file path.

    format

    The file format.

    progressHandler

    The operation progress handler. The value will be between 0 and 100.

    completionHandler

    The operation completion handler. @details All the landmarks will be added as uncategorized.

  • Async import landmarks from given file format.

    Declaration

    Objective-C

    - (void)importLandmarks:(nonnull NSString *)filePath
                     format:(LandmarkImportFileFormat)format
                 categoryId:(int)categoryId
            progressHandler:(nonnull void (^)(float))progressHandler
          completionHandler:(nonnull void (^)(SDKErrorCode))completionHandler;

    Swift

    func importLandmarks(_ filePath: String, format: LandmarkImportFileFormat, categoryId: Int32, progressHandler: @escaping (Float) -> Void) async -> SDKErrorCode

    Parameters

    path

    The file path.

    format

    The file format.

    categoryId

    The category id.

    progressHandler

    The operation progress handler. The value will be between 0 and 100.

    completionHandler

    The operation completion handler. @details All the landmarks will be added to the category id specify. The category must be available in the store.

  • Cancel async import landmarks operation

    Declaration

    Objective-C

    - (void)cancelImportLandmarks;

    Swift

    func cancelImportLandmarks()