identifyLayerCancelable method

CancelableOperation<IdentifyLayerResult> identifyLayerCancelable(
  1. Layer layer,
  2. {required Offset screenPoint,
  3. required double tolerance,
  4. int? maximumResults = 1}
)

Cancelable version of identifyLayer. See that method for more information.

Implementation

CancelableOperation<IdentifyLayerResult> identifyLayerCancelable(Layer layer,
    {required Offset screenPoint,
    required double tolerance,
    int? maximumResults = 1}) {
  final coreScreenPoint = screenPoint.toArcGIS();
  final taskHandle = _withThrowingErrorHandler((errorHandler) {
    return runtimecore.RT_GeoView_identifyLayerWithMaxResultsNullable(
        _handle,
        layer._handle,
        coreScreenPoint.ref,
        tolerance,
        maximumResults,
        errorHandler);
  });
  return taskHandle.toCancelableOperation(
      (element) => element.getValueAsIdentifyLayerResult()!);
}