Home > @magiclane/maps-sdk > LandmarkStore
LandmarkStore class
Provides access to a landmark store and its operations.
This class should not be instantiated directly. Instead, use the related methods from LandmarkStoreService to obtain an instance.
It represents a single persistence store instance and is the primary entry point for reading, adding, updating and removing landmark data and categories, plus creating scoped browse sessions for iterative access.
Typical tasks include enumerating and filtering landmarks (by category or geographic area), creating and modifying categories, importing external landmark datasets. Main members expose store identity and metadata, collections of category and landmark objects.
Can be presented on the map using the LandmarkStoreCollection associated with a GemMapController, in for custom search operations and for alerts.
Places
Signature:
export declare class LandmarkStore extends GemAutoreleaseObject Extends: GemAutoreleaseObject
Remarks
The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the LandmarkStore class.
Properties
|
Property |
Modifiers |
Type |
Description |
|---|---|---|---|
|
|
Get the list of all categories. | ||
|
|
number |
Get the ID of the landmark store. | |
|
|
Get the landmark store image. | ||
|
|
(not declared) | ||
|
|
number | ||
|
|
string |
Get the landmark store name. | |
|
|
number | bigint | ||
|
|
Get the type of the landmark store. | ||
|
|
(not declared) |
Methods
|
Method |
Modifiers |
Description |
|---|---|---|
|
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. | ||
|
Add a landmark to the specified category in the landmark store. If the landmark already exists in the landmark store, only the category info is updated. | ||
|
Cancel async import landmarks operation | ||
|
Checks if the landmark store contains the landmark ID | ||
|
Create a landmarks browse session with the specified settings Shows only the landmarks added before the LandmarkBrowseSession was created | ||
|
Cleans up any resources. | ||
|
Get the list of categories for the specified landmark. | ||
|
Get the category by ID. | ||
|
Get landmark store path. | ||
|
Get the specified landmark. | ||
|
Get the number of all landmarks within the specified category. If the category ID is uncategorizedLandmarkCategId, the uncategorized landmarks count is returned. If the category ID is invalidLandmarkCategId, the total landmarks count is returned. | ||
|
Get the landmarks within the specified category. | ||
|
Get the landmarks within the specified area. | ||
|
importLandmarks({ filePath, format, image, onComplete, onProgressUpdated, categoryId, }, input) |
Asynchronously import landmarks from given file format | |
|
Asynchronously import landmarks from given buffer format | ||
|
Get fast update mode state. | ||
|
Remove all landmarks from store. | ||
|
Remove the specified category. | ||
|
Remove the specified landmark. | ||
|
Set the landmark store image. Setting a valid landmark store image will override individual items images, see Landmark.getImage Setting an empty landmark store image will restore individual items images, see Landmark.getImage | ||
|
Set landmark category id | ||
|
Start landmark store fast update mode Fast update mode - allow fast insert, delete and update operations. This mode should be used with caution because if a power failure or process crash interrupts it, the database will likely be corrupted and will be deleted at next startup. This is intended for fast import of external landmarks into application format | ||
|
Stop landmark store fast update mode. | ||
|
Update the specified category. The category object must belong to this landmark store. No fields of the parameter will be updated by this call. | ||
|
Update the information about a landmark. This updates only the information about a landmark and does not modify the categories the landmark belongs to. The landmark instance passed in as the parameter must be an instance that belongs to this landmark store. Calling this method updates the timestamp of the landmark. |