MutablePart.withSpatialReference constructor

MutablePart.withSpatialReference(
  1. SpatialReference? spatialReference
)

Creates a part with a specified spatial reference.

Parameters:

  • spatialReference — A spatial reference object, can be null.

Implementation

factory MutablePart.withSpatialReference(SpatialReference? spatialReference) {
  _initializeArcGISEnvironmentIfNeeded();
  final handle = _withThrowingErrorHandler((errorHandler) {
    return runtimecore.RT_MutablePart_createWithSpatialReference(
        spatialReference?._handle ?? ffi.nullptr, errorHandler);
  });
  final MutablePart object = MutablePart._withHandle(handle);
  object._spatialReference.cache(spatialReference);
  return object;
}