Viewpoint.fromTargetExtent constructor

Viewpoint.fromTargetExtent(
  1. Geometry targetExtent,
  2. {double rotation = double.nan}
)

Creates a viewpoint with a bounding extent and rotation.

Parameters:

  • targetExtent — The geometry to use as the visible area.
  • rotation — The rotation angle in degrees between 0 and 360.

Implementation

factory Viewpoint.fromTargetExtent(Geometry targetExtent,
    {double rotation = double.nan}) {
  _initializeArcGISEnvironmentIfNeeded();
  final handle = _withThrowingErrorHandler((errorHandler) {
    return runtimecore.RT_Viewpoint_createWithExtentRotation(
        targetExtent._handle, rotation, errorHandler);
  });
  return Viewpoint._withHandle(handle);
}