Class DistanceCompositeSceneSymbol

All Implemented Interfaces:
JsonSerializable

public final class DistanceCompositeSceneSymbol extends SceneSymbol
A type of Symbol that changes based on the distance, in meters, between the SceneView's Camera and GeoElement that the Symbol is assigned to.

A Range links a Symbol to a minimum and maximum distance, the Symbol is then only visible between that distance. A RangeCollection then links these Ranges to a DistanceCompositeSceneSymbol which will be used by a GeoElement and display each Symbol within it's set distance.

Example of creating a DistanceCompositeSceneSymbol and accessing it's RangeCollection to add Ranges. Each Range will specify a Symbol and a distance at which that symbol will be displayed between. This example will display one of three different symbols, when viewed between 0 to 5,000,000 meters.

 DistanceCompositeSceneSymbol symbol = new DistanceCompositeSceneSymbol();
 SimpleMarkerSymbol symbol1 = new SimpleMarkerSymbol(Style.CROSS, 0xFF00FF00, 40);
 SimpleMarkerSymbol symbol2 = new SimpleMarkerSymbol(Style.CIRCLE, 0xFFFf0000, 40);
 SimpleMarkerSymbol symbol3 = new SimpleMarkerSymbol(Style.SQUARE, 0xFF0000FF, 40);
 symbol.getRangeCollection().add(new Range(symbol1, 0, 10000));
 symbol.getRangeCollection().add(new Range(symbol2, 10000, 50000));
 symbol.getRangeCollection().add(new Range(symbol3, 50000, 5000000));
 
Since:
100.0.0
  • Constructor Details

    • DistanceCompositeSceneSymbol

      public DistanceCompositeSceneSymbol()
      Create a distance composite scene symbol object.

      Use this method to create a distance composite scene symbol which is a container of symbols with distance display ranges. Each symbol added to the contained range collection can specify a minimum and maximum display distance. When a feature is rendered, the distance from the camera will be checked against the specified minimum and maximum range to determine the symbol's visibility. Note that symbol ranges for the contained symbols are not exclusive and may overlap.

      Since:
      100.0.0
      See Also:
  • Method Details

    • getRangeCollection

      public DistanceCompositeSceneSymbol.RangeCollection getRangeCollection()
      Gets the RangeCollection used by this DistanceCompositeSceneSymbol.

      A RangeCollection links Ranges to a DistanceCompositeSceneSymbol which details what Symbol is shown between what minimum and maximum distance, in meters, from the SceneView's Camera.

      Returns:
      the range collection, empty by default
      Since:
      100.0.0
      See Also: