Class FeatureCollectionLayer

  • All Implemented Interfaces:
    LayerContent, Loadable

    public final class FeatureCollectionLayer
    extends Layer
    Represents a layer that can display features from a FeatureCollection. This layer aggregates one or more sub-layers, each of which is responsible for displaying features from an individual FeatureCollectionTable in the FeatureCollection. Each of these sub-layers can contain features with a different GeometryType.
    Since:
    100.0.0
    • Constructor Detail

      • FeatureCollectionLayer

        public FeatureCollectionLayer​(FeatureCollection featureCollection)
        Creates a FeatureCollectionLayer from a FeatureCollection.
        Parameters:
        featureCollection - the FeatureCollection to visualize with this FeatureCollectionLayer
        Throws:
        IllegalArgumentException - if featureCollection is null
        Since:
        100.0.0
    • Method Detail

      • getItem

        public Item getItem()
        Description copied from class: Layer
        Gets the Item associated with this layer.
        Overrides:
        getItem in class Layer
        Returns:
        the associated Item or null if this layer is not associated with an Item
      • getFeatureCollection

        public FeatureCollection getFeatureCollection()
        Gets the FeatureCollection visualized by this FeatureCollectionLayer.
        Returns:
        the FeatureCollection visualized by this FeatureCollectionLayer
        Since:
        100.0.0
      • copy

        public FeatureCollectionLayer copy()
        Creates a deep copy of this FeatureCollectionLayer instance.
        Returns:
        a deep copy of this FeatureCollectionLayer instance, which means that copies of all fields of this layer are made including its loading state
        Since:
        100.1.0