extent property

Envelope? extent

Calculates and returns the extent of the GraphicsOverlay.graphics collection.

The extent's SpatialReference is that of the GeoViewController that contains the overlay. If the overlay is not in a view, returns null. If the overlay is in a view but that view does not yet have a spatial reference, returns null. If the overlay is in a view with a spatial reference, but has no graphics, then an empty envelope will be returned.

Implementation

Envelope? get extent {
  final objectHandle = _withThrowingErrorHandler((errorHandler) {
    return runtimecore.RT_GraphicsOverlay_getExtent(_handle, errorHandler);
  });
  return Envelope._fromHandle(objectHandle);
}