Class ScaleRangeDisplayFilter

java.lang.Object
com.esri.arcgisruntime.layers.DisplayFilter
com.esri.arcgisruntime.layers.ScaleRangeDisplayFilter

public class ScaleRangeDisplayFilter extends DisplayFilter
A DisplayFilter that is applied on the layer based on the provided scale range.
Since:
100.13.0
See Also:
  • Constructor Details

    • ScaleRangeDisplayFilter

      public ScaleRangeDisplayFilter(String name, String whereClause, double minScale, double maxScale)
      Creates a new ScaleRangeDisplayFilter with the specified filter id, where clause, and scale range.
      Parameters:
      name - a descriptive name for this display filter
      whereClause - a SQL expression that defines which features are rendered. An empty where clause is not allowed.
      minScale - the minimum scale at which this display filter is applied. If MapView.getMapScale() or Viewpoint.getTargetScale() is less than or equal to this value, the DisplayFilter will be applied. This value should be greater than maxScale. A value of 0 indicates that this display filter is applied without an upper limit.
      maxScale - the maximum scale at which this display filter is applied. If MapView.getMapScale() or Viewpoint.getTargetScale() is greater than or equal to this value, the DisplayFilter will be applied. This value should be less than minScale. A value of 0 indicates that this display filter is applied without a lower limit.
      Throws:
      IllegalArgumentException - if name is null or empty
      IllegalArgumentException - if whereClause is null or empty
      ArcGISRuntimeException - if the the maxScale is greater than the minScale
      Since:
      100.13.0
  • Method Details

    • getMaxScale

      public double getMaxScale()
      Gets the maximum scale at which this display filter is applied.

      This display filter is only applied when zoomed further out than the maximum scale. Set this property to allow current scale of the map to determine when this display filter is applied. If MapView.getMapScale() or Viewpoint.getTargetScale() is greater than or equal to this value, the DisplayFilter will be applied. This value should be less than getMinScale(). A value of 0 indicates this display filter is applied without an upper limit. The default value is 0.

      Returns:
      the maximum scale at which this display filter is applied
      Since:
      100.13.0
    • setMaxScale

      public void setMaxScale(double maxScale)
      Sets the maximum scale at which this display filter is applied.

      This display filter is only applied when zoomed further out than the maximum scale. Set this property to allow current scale of the map to determine when this display filter is applied. If MapView.getMapScale() or Viewpoint.getTargetScale() is greater than or equal to this value, the DisplayFilter will be applied. This value should be less than getMinScale(). A value of 0 indicates this display filter is applied without an upper limit. The default value is 0.

      Parameters:
      maxScale - the maximum scale at which this display filter is applied
      Since:
      100.13.0
    • getMinScale

      public double getMinScale()
      Gets the minimum scale at which this display filter is applied.

      This display filter is only applied when zoomed further in than the minimum scale. Set this property to allow current scale of the map to determine when this display filter is applied. If MapView.getMapScale() or Viewpoint.getTargetScale() is less than or equal to this value, the DisplayFilter will be applied. This value should be greater than getMaxScale(). A value of 0 indicates this display filter is applied without a lower limit. The default value is 0.

      Returns:
      the minimum scale at which this display filter is applied
      Since:
      100.13.0
    • setMinScale

      public void setMinScale(double minScale)
      Sets the minimum scale at which this display filter is applied.

      This display filter is only applied when zoomed further in than the minimum scale. Set this property to allow current scale of the map to determine when this display filter is applied. If MapView.getMapScale() or Viewpoint.getTargetScale() is less than or equal to this value, the DisplayFilter will be applied. This value should be greater than getMaxScale(). A value of 0 indicates this display filter is applied without a lower limit. The default value is 0.

      Parameters:
      minScale - the minimum scale at which this display filter is applied
      Since:
      100.13.0