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 for JavaSE and 100.1.0 for Android
    • Constructor Detail

      • DistanceCompositeSceneSymbol

        public DistanceCompositeSceneSymbol()
        Creates a new instance of a DistanceCompositeSceneSymbol with an empty RangeCollection.

        If the RangeCollection is empty then no Symbol will be displayed.

        Since:
        100.0.0 for JavaSE and 100.1.0 for Android
        See Also:
        DistanceCompositeSceneSymbol.RangeCollection.add(Range)
    • Method Detail

      • 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 for JavaSE and 100.1.0 for Android
        See Also:
        DistanceCompositeSceneSymbol.Range