@magiclane/maps-sdk
    Preparing search index...

    Class LandmarkStoreCollection

    Landmark store collection class

    This class should not be instantiated directly. Instead, use the [MapViewPreferences.lmks] getter to obtain an instance.

    Hierarchy

    • GemAutoreleaseObject
      • LandmarkStoreCollection
    Index

    Constructors

    • Internal

      Parameters

      • id: number
      • mapId: number

      Returns LandmarkStoreCollection

    Accessors

    • get mapId(): number

      Returns number

    • get pointerId(): number

      Returns number

    • get size(): number

      Get the number of stores in the list.

      Returns number

      The number of stores

      An exception if it fails.

    Methods

    • Add all categories from the specified store.

      Parameters

      Returns GemError

      • [GemError.success] on success
      • Other [GemError] values if it fails.

      An exception if it fails.

    • Add all categories from the specified store ID.

      Parameters

      • storeId: number

        The store ID

      Returns GemError

      • [GemError.success] on success
      • [GemError.notFound] if the store with the given id can't be found

      An exception if it fails.

    • Add a new category ID into the specified store list.

      Parameters

      • storeId: number

        The store ID

      • categoryId: number

        The category ID

      Returns GemError

      • [GemError.success] on success
      • [GemError.notFound] if the store with the given id can't be found or if the category with the given id can't be found

      An exception if it fails.

    • Add a list of categories into the specified store list.

      Parameters

      • storeId: number

        The store ID

      • categories: LandmarkCategory[]

        The list of categories

      Returns GemError

      • [GemError.success] on success
      • [GemError.notFound] if the store with the given id can't be found or if the category with the given id can't be found

      An exception if it fails.

    • Remove all stores and categories.

      Returns void

      An exception if it fails.

    • Check if the specified category ID from the specified store ID was already added.

      Parameters

      • storeId: number

        The store ID

      • categoryId: number

        The category ID

      Returns boolean

      True if the category ID from the store ID was already added, false otherwise.

      An exception if it fails.

    • Check if the specified store has any category in the list.

      Parameters

      Returns boolean

      True if the store has any category in the list, false otherwise.

      An exception if it fails.

    • Check if the specified store ID has any category in the list.

      Parameters

      • storeId: number

        The store ID

      Returns boolean

      True if the store has any category in the list, false otherwise.

      An exception if it fails.

    • Get the number of categories enabled for the specified store.

      Parameters

      • storeId: number

        The store ID

      Returns number

      • The number of categories if the store id exists in the collection
      • [GemError.notFound].code if the store does not exist in the collection

      An exception if it fails.

    • Get the specified category ID for the specified store.

      Parameters

      • storeId: number

        The store ID

      • indexCategory: number

        The index of the category

      Returns number

      • The number of categories if the store id exists in the collection
      • [GemError.notFound].code if the store does not exist in the collection
      • [GemError.outOfRange].code if the index is invalid

      An exception if it fails.

    • Get the store ID for the specified index.

      Parameters

      • index: number

        The index should be less than the value provided by [size].

      Returns number

      • On success, returns the store ID greater than 0
      • [GemError.outOfRange].code if index is invalid

      An exception if it fails.

    • Registers an object for auto release. When the object is not used anymore, it will be released automatically from C++.

      Parameters

      • pointerId: any

        The pointer ID to register

      Returns void

    • Remove all categories of the specified store.

      Parameters

      Returns GemError

      [GemError.success] on success, otherwise see [GemError] for other values.

      An exception if it fails.

    • Remove all categories of the specified store ID.

      Parameters

      • storeId: number

        The store ID

      Returns GemError

      • [GemError.success] on success
      • [GemError.notFound] if no store with the given ID has been found

      An exception if it fails.

    • Remove category ID from the specified store list.

      Parameters

      • storeId: number

        The store ID

      • categoryId: number

        The category ID

      Returns GemError

      • [GemError.success] on success
      • [GemError.notFound] if no store with the given ID has been found or the category has not been found

      An exception if it fails.