LandmarkStore class Landmark Store

Provides access to a persistent collection of landmarks and categories.

A LandmarkStore represents a single persisted store (backed by a local database) that contains landmarks and their categories. Use LandmarkStoreService factory methods to create or obtain instances. Landmark stores support reading, adding, updating and removing landmarks and categories, importing external datasets, and creating browse sessions for paged access.

Typical uses:

  • Persisting user-created landmarks between sessions.
  • Displaying a set of landmarks on the map via LandmarkStoreCollection.
  • Customizing search and alarm behavior by selecting stores and categories.

See also:

Properties

categories List<LandmarkCategory>
Returns all categories defined in this landmark store.
no setter
hashCode int
The hash code for this object.
no setterinherited
id int
Returns the unique identifier for this landmark store.
no setter
image Img
Get the image as a Img.
no setter
mapId int
no setter
name String
Returns the persisted name of this landmark store.
no setter
pointerId int
The pointer ID of the native object
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
type LandmarkStoreType
Returns the type of this landmark store.
no setter

Methods

addCategory(LandmarkCategory category) → void
Adds a new category to this landmark store.
addLandmark(Landmark landmark, {int categoryId = LandmarkStore.uncategorizedLandmarkCategId}) → void
Adds a landmark copy to this store under the specified category.
cancelImportLandmarks() → void
Cancels a previously started asynchronous import operation for this store.
containsLandmark(int landmarkId) bool
Returns true when the store contains a landmark with landmarkId.
createLandmarkBrowseSession({LandmarkBrowseSessionSettings? settings}) LandmarkBrowseSession
Creates a LandmarkBrowseSession to iteratively browse landmarks in this store.
dispose() → void
Disposes the native object.
inherited
getCategoriesFromLandmark(int landmarkId) List<LandmarkCategory>
Returns categories assigned to a specific landmark in this store.
getCategoryById(int categoryId) LandmarkCategory?
Retrieves a specific category by its id from this store.
getFilePath() String
Returns the filesystem path used to persist this landmark store.
getLandmark(int landmarkId) Landmark?
Retrieves a landmark by its id from this store.
getLandmarkCount({int categoryId = LandmarkStore.invalidLandmarkCategId}) int
Returns the number of landmarks in categoryId.
getLandmarks({int categoryId = LandmarkStore.invalidLandmarkCategId}) List<Landmark>
Returns landmarks that belong to categoryId or all landmarks when invalidLandmarkCategId is used.
getLandmarksInArea({GeographicArea? area, int categoryId = LandmarkStore.invalidLandmarkCategId}) List<Landmark>
Returns landmarks within a geographic area, optionally filtered by categoryId.
importLandmarks({required String filePath, required LandmarkFileFormat format, required Img image, void onComplete(GemError error)?, void onProgressUpdated(int progress)?, int categoryId = uncategorizedLandmarkCategId}) ProgressListener?
Asynchronously imports landmarks into this store from a file path.
importLandmarksWithDataBuffer({required Uint8List buffer, required LandmarkFileFormat format, required Img image, void onComplete(GemError error)?, void onProgressUpdated(int progress)?, int categoryId = uncategorizedLandmarkCategId}) ProgressListener?
Asynchronously imports landmarks into this store from a raw data buffer.
isFastUpdateMode() bool
Returns whether fast update mode is currently active for this store.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
registerAutoReleaseObject(int pointerId) → void
Registers an object for auto release.
inherited
removeAllLandmarks() → void
Remove all landmarks from store.
removeCategory(int categoryId, {bool removeLmkContent = false}) → void
Removes a category from this store.
removeLandmark(Landmark landmark) → void
Removes a landmark from this store.
setImage(Img image) GemError
Sets an image to represent this landmark store from an Img instance.
setLandmarkCategory(Landmark landmark, int categoryId) → void
Assigns a category id to a landmark in this store.
startFastUpdateMode() → void
Enables fast update mode to optimize bulk insert/delete/update operations.
stopFastUpdateMode({bool discard = false}) → void
Stops fast update mode and optionally discards pending changes.
toString() String
A string representation of this object.
inherited
updateCategory(LandmarkCategory category) → void
Updates metadata for a category that belongs to this store.
updateLandmark(Landmark landmark) → void
Updates the persisted data for an existing landmark in this store.

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

invalidLandmarkCategId → const int
Sentinel value that indicates an invalid category identifier.
uncategorizedLandmarkCategId → const int
ID used to mark landmarks as uncategorized.