replaceGeometry method

void replaceGeometry(
  1. Geometry geometry
)

Replaces the current GeometryEditor.geometry with the specified geometry.

Use this method to make changes to the GeometryEditor.geometry that are not directly supported using other GeometryEditor methods. For example, to start a new part in a Polygon or Polyline geometry, get the current GeometryEditor.geometry, use a MultipartBuilder to add the required part, and then pass the updated GeometryBuilder.toGeometry to this method.

Parameters:

  • geometry — The new geometry to replace the current geometry. The GeometryType of these geometries must match.

Implementation

void replaceGeometry(
  Geometry geometry,
) {
  _withThrowingErrorHandler((errorHandler) {
    runtimecore.RT_GeometryEditor_replaceGeometry(
      _handle,
      geometry._handle,
      errorHandler,
    );
  });
}