MutablePointCollection.withSpatialReference constructor

MutablePointCollection.withSpatialReference(
  1. SpatialReference? spatialReference
)

Creates a mutable point collection with a specified spatial reference.

Parameters:

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

Implementation

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