You're viewing an older version of Vaadin JavaDoc. Please see version 24.7.0 for the latest.
com.vaadin.flow.component.map.configuration.layer.

Class FeatureLayer

  • All Implemented Interfaces:

    Serializable

    public class FeatureLayer
    extends VectorLayer

    Layer that allows to conveniently display a number of geographic features. A Feature can be anything that should be displayed on top of a map, such as points of interest, vehicles or people.

    The layer is a high-level abstraction built on top of VectorLayer, and uses a VectorSource by default.

    See Also:

    Serialized Form

    • Constructor Detail

      • FeatureLayer

        public FeatureLayer()
    • Method Detail

      • getFeatures

        public List<Feature> getFeatures()

        The features managed by this layer. This returns an immutable collection, which means it can not be modified. Use addFeature(Feature) and removeFeature(Feature) instead.

        Returns:

        the features managed by the layer, immutable

      • addFeature

        public void addFeature​(Feature feature)

        Adds a feature to the layer

        Parameters:

        feature - the feature to be added

      • removeFeature

        public void removeFeature​(Feature feature)

        Removes a feature from the layer

        Parameters:

        feature - the feature to be removed