All Implemented Interfaces:
Serializable, Evented, SupportsLayerEvents, SupportsMouseEvents, FeatureGroupFunctions, LayerGroupFunctions, HasStyle, Identifiable, LayerPopupFunctions, LayerTooltipFunctions, ExecutableFunctions
Direct Known Subclasses:
MarkerClusterGroup

public class FeatureGroup extends LayerGroup implements HasStyle, SupportsMouseEvents, SupportsLayerEvents, FeatureGroupFunctions
Extended LayerGroup that makes it easier to do the same thing to all its member layers
Since:
2020-02-06
Version:
1.0
Author:
Gabor Kokeny Email: kokeny19@gmail.com
See Also:
  • Constructor Details

    • FeatureGroup

      public FeatureGroup()
      Creates an empty feature group.
    • FeatureGroup

      public FeatureGroup(Layer... layers)
      Creates a feature group containing the given layers.
      Parameters:
      layers - the layers to add to this group
    • FeatureGroup

      public FeatureGroup(List<Layer> layers)
      Creates a feature group containing the given layers.
      Parameters:
      layers - the layers to add to this group
  • Method Details

    • setStyle

      public void setStyle(PathOptions pathOptions)
      Sets the given path style options on the feature group and applies them to every member layer that supports styling.
      Specified by:
      setStyle in interface FeatureGroupFunctions
      Specified by:
      setStyle in interface HasStyle
      Parameters:
      pathOptions - the style options to apply to all member layers
    • getStyle

      public PathOptions getStyle()
      Returns the path style options currently applied to this feature group.
      Specified by:
      getStyle in interface HasStyle
      Returns:
      the current style options