selectFeaturesWithQuery method

Future<FeatureQueryResult> selectFeaturesWithQuery({
  1. required QueryParameters parameters,
  2. required SelectionMode mode,
})

Selects the features that match the criteria in the QueryParameters object and adds them to the current list of selected features.

Parameters:

  • parameters — The definition of the query to submit to the feature table.
  • mode — Defines how the list of currently selected features will be updated with the features returned from the query.

Return Value: A Future that returns a FeatureQueryResult.

Implementation

Future<FeatureQueryResult> selectFeaturesWithQuery({
  required QueryParameters parameters,
  required SelectionMode mode,
}) {
  final taskHandle = _withThrowingErrorHandler((errorHandler) {
    return runtimecore.RT_AnnotationLayer_selectFeaturesAsync(
      _handle,
      parameters._handle,
      mode.coreValue,
      errorHandler,
    );
  });
  return taskHandle.toFuture(
    (element) => element.getValueAsFeatureQueryResult()!,
  );
}