Bookmark constructor

Bookmark(
  1. {String name = '',
  2. Viewpoint? viewpoint}
)

Creates a bookmark object.

Parameters:

  • name — The name.
  • viewpoint — The viewpoint.

Implementation

factory Bookmark({String name = '', Viewpoint? viewpoint}) {
  _initializeArcGISEnvironmentIfNeeded();
  final coreName = _CString(name);
  final handle = _withThrowingErrorHandler((errorHandler) {
    return runtimecore.RT_Bookmark_createCombined(
        coreName.bytes, viewpoint?._handle ?? ffi.nullptr, errorHandler);
  });
  final Bookmark object = Bookmark._withHandle(handle);
  object._viewpoint.cache(viewpoint);
  return object;
}