PolygonBuilder.fromSpatialReference constructor

PolygonBuilder.fromSpatialReference(
  1. SpatialReference? spatialReference
)

Creates a new empty polygon builder with the specified SpatialReference.

The SpatialReference cannot be changed after instantiation.

Parameters:

  • spatialReference — The builder's spatial reference.

Implementation

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