importLandmarks method
Asynchronously import landmarks from given file format
Parameters
- IN filePath The file path
 - IN format The file format, see LandmarkFileFormat.
 - IN image The landmark map image. If left empty, a default image is assigned
 - IN onProgressUpdated Callback that gets triggered with the associated progress when the update process is in progress.
 - IN onComplete	Callback that gets triggered with the associated GemError when the update process is completed.
- Is called with GemError.success if the operation suceeded
 - Is called with GemError.inUse if an import is already in progress
 - Is called with GemError.notFound if the file could not be opened or it the landmark store category id is invalid
 - Is called with GemError.cancel if the operation was canceled
 - Is called with GemError.invalidInput if the provided data could not be parsed
 
 - IN categoryId The category for the new imported landmarks. The category must exist or use uncategorizedLandmarkCategId to set the landmark as uncategorized
 
Returns
- The associated ProgressListener if the request can be started, null otherwise.
 
Implementation
ProgressListener? importLandmarks({
  required String filePath,
  required LandmarkFileFormat format,
  required Img image,
  final void Function(GemError error)? onComplete,
  final void Function(int progress)? onProgressUpdated,
  int categoryId = uncategorizedLandmarkCategId,
}) {
  final EventDrivenProgressListener progressListener =
      EventDrivenProgressListener();
  if (onComplete != null) {
    progressListener.registerOnCompleteWithData(
      (final int err, final String hint, final Map<dynamic, dynamic> json) =>
          onComplete(GemErrorExtension.fromCode(err)),
    );
  }
  if (onProgressUpdated != null) {
    progressListener.registerOnProgress(onProgressUpdated);
  }
  GemKitPlatform.instance.registerEventHandler(
    progressListener.id,
    progressListener,
  );
  final OperationResult resultString = objectMethod(
    pointerId,
    'LandmarkStore',
    'importLandmarks',
    args: <String, dynamic>{
      'path': filePath,
      'fileFormat': format.id,
      'image': image.pointerId,
      'categoryId': categoryId,
      'listener': progressListener.id,
    },
  );
  final GemError errorCode = GemErrorExtension.fromCode(
    resultString['result'],
  );
  if (errorCode != GemError.success) {
    onComplete?.call(errorCode);
    return null;
  }
  return progressListener;
}