Class DistanceCompositeSceneSymbol.Range

java.lang.Object
com.esri.arcgisruntime.symbology.DistanceCompositeSceneSymbol.Range
Enclosing class:
DistanceCompositeSceneSymbol

public static final class DistanceCompositeSceneSymbol.Range extends Object
Links a Symbol to a minimum and maximum distance, in meters, from the SceneView's Camera at which this Symbol will be visible between.

When a Range's maximum distance is set to 0, the default value, the Symbol that is assigned will be visible from the minimum distance set and onward. Setting a minimum distance to be great than a maximum distance will cause the Symbol to never display.

Example of setting a SimpleMarkerSymbol to a Range that has a minimum and maximum distance set. This Range will display it's SimpleMarkerSymbol between 0 and 2000 meters from SceneView's Camera.

 SimpleMarkerSymbol crossSymbol = new SimpleMarkerSymbol(Style.CROSS, 0xFF00FF00, 40);
 Range range = new Range(cross2D, 0, 2000));
 
Since:
100.0.0
  • Constructor Summary

    Constructors
    Constructor
    Description
    Range(Symbol symbol)
    Creates a Range that displays the given Symbol.
    Range(Symbol symbol, double minDistance, double maxDistance)
    Creates a Range that displays the given Symbol when the SceneView's Camera is within the minimum and maximum distance that is passed.
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    Gets the maximum distance from the SceneView's Camera at which the Symbol assigned to this Range will be displayed.
    double
    Gets the minimum distance from the SceneView's surface at which the Symbol assigned to this Range will be displayed.
    Gets the Symbol to be displayed when the SceneView's Camera is within the distance set by this Range.
    void
    setMaxDistance(double maxDistance)
    Sets the maximum distance from the SceneView's Camera at which the Symbol assigned to this Range will be displayed.
    void
    setMinDistance(double minDistance)
    Sets the minimum distance from the SceneView's Camera at which the Symbol assigned to this Range will be displayed.
    void
    setSymbol(Symbol symbol)
    Sets the Symbol to be displayed when the SceneView's Camera is within the distance set by this Range.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Range

      public Range(Symbol symbol)
      Creates a Range that displays the given Symbol.

      When no minimum or maximum distance is set the Symbol will always be displayed.

      Parameters:
      symbol - symbol to be used for this range, can't be null
      Throws:
      IllegalArgumentException - if symbol is null
      Since:
      100.0.0
    • Range

      public Range(Symbol symbol, double minDistance, double maxDistance)
      Creates a Range that displays the given Symbol when the SceneView's Camera is within the minimum and maximum distance that is passed.
      Parameters:
      symbol - symbol to be used for this range, can't be null
      minDistance - minimum distance for this range, in meters
      maxDistance - maximum distance for this range, in meters
      Throws:
      IllegalArgumentException - if symbol is null
      IllegalArgumentException - if minDistance is less than 0
      IllegalArgumentException - if maxDistance is less than 0
      Since:
      100.0.0
      See Also:
  • Method Details

    • getSymbol

      public Symbol getSymbol()
      Gets the Symbol to be displayed when the SceneView's Camera is within the distance set by this Range.
      Returns:
      the symbol for this range
      Since:
      100.0.0
    • setSymbol

      public void setSymbol(Symbol symbol)
      Sets the Symbol to be displayed when the SceneView's Camera is within the distance set by this Range.
      Parameters:
      symbol - symbol for this range, can't be null
      Throws:
      IllegalArgumentException - if symbol is null
      Since:
      100.0.0
    • getMinDistance

      public double getMinDistance()
      Gets the minimum distance from the SceneView's surface at which the Symbol assigned to this Range will be displayed.
      Returns:
      the minimum distance, 0 by default, in meters
      Since:
      100.0.0
    • setMinDistance

      public void setMinDistance(double minDistance)
      Sets the minimum distance from the SceneView's Camera at which the Symbol assigned to this Range will be displayed.

      Setting minimum distance greater than maximum distance will cause the Symbol that is set to never display.

      Parameters:
      minDistance - minimum distance, in meters
      Throws:
      IllegalArgumentException - if minDistance is less than 0
      Since:
      100.0.0
    • getMaxDistance

      public double getMaxDistance()
      Gets the maximum distance from the SceneView's Camera at which the Symbol assigned to this Range will be displayed.
      Returns:
      the maximum distance, 0 by default, in meters
      Since:
      100.0.0
    • setMaxDistance

      public void setMaxDistance(double maxDistance)
      Sets the maximum distance from the SceneView's Camera at which the Symbol assigned to this Range will be displayed.

      Setting the maximum distance to 0, the default value, will display the Symbol that is set starting from the minimum distance and beyond.

      Parameters:
      maxDistance - maximum distance, in meters
      Throws:
      IllegalArgumentException - if maxDistance is less than 0
      Since:
      100.0.0