ScaleRangeDisplayFilter.withScaleRange constructor

ScaleRangeDisplayFilter.withScaleRange(
  1. {required String name,
  2. required String whereClause,
  3. required double minScale,
  4. required double maxScale}
)

Creates a new ScaleRangeDisplayFilter with the specified name, where clause, and scale range.

Parameters:

  • name — A descriptive name for this display filter.
  • whereClause — A SQL expression that defines which features are rendered.
  • minScale — The minimum scale at which this display filter is applied.
  • maxScale — The maximum scale at which this display filter is applied.

Implementation

factory ScaleRangeDisplayFilter.withScaleRange(
    {required String name,
    required String whereClause,
    required double minScale,
    required double maxScale}) {
  _initializeArcGISEnvironmentIfNeeded();
  final coreName = _CString(name);
  final coreWhereClause = _CString(whereClause);
  final handle = _withThrowingErrorHandler((errorHandler) {
    return runtimecore.RT_ScaleRangeDisplayFilter_createWithScaleRange(
        coreName.bytes,
        coreWhereClause.bytes,
        minScale,
        maxScale,
        errorHandler);
  });
  return DisplayFilter._instanceCache.instanceWith(handle);
}