registerLandmarkStore static method

int registerLandmarkStore({
  1. required String name,
  2. required String path,
})

Registers an existing landmark store that already exists on disk.

Use this to make an external store available to the SDK. The supplied name overrides the store's internal name and must be unique.

Parameters

  • name: The name to register the store under. If this name is already used the operation fails with GemError.exist.code.
  • path: Filesystem path pointing to the existing landmark store.

Returns

  • int: On success returns the landmark store id (positive integer).
  • int: On failure returns a GemError code. Possible error codes include:
    • [GemError.exist].code: The name is already taken.
    • [GemError.notFound].code: The store could not be found at path.
    • [GemError.invalidInput].code: The provided path does not contain a valid store.

Implementation

static int registerLandmarkStore({
  required final String name,
  required final String path,
}) {
  final OperationResult resultString = staticMethod(
    'LandmarkStoreService',
    'registerLandmarkStore',
    args: <String, String>{'name': name, 'path': path},
  );

  final int res = resultString['result'];
  return res;
}