Class GeometryCollection

java.lang.Object
com.massifmaps.vectorelements.VectorElement
com.massifmaps.vectorelements.GeometryCollection

public class GeometryCollection extends VectorElement
A collection of multiple geometries that can be displayed on the map.
  • Constructor Details

    • GeometryCollection

      public GeometryCollection(MultiGeometry geometry, GeometryCollectionStyle style)
      Constructs a new GeometryCollection object from multigeometry and style.
      Parameters:
      geometry - The multigeometry containing possibly points, lines, polygons.
      style - The style defining multigeometry rendering.
  • Method Details

    • getGeometry

      public MultiGeometry getGeometry()
      Description copied from class: VectorElement
      Returns the geometry object that defines the location of this vector element.
      Overrides:
      getGeometry in class VectorElement
      Returns:
      The geometry object of this vector element.
    • setGeometry

      public void setGeometry(MultiGeometry geometry)
      Sets the geometry for this geometry collection.
      Parameters:
      geometry - The new geometry object.
    • getStyle

      public GeometryCollectionStyle getStyle()
      Returns the style of this geometry collection.
      Returns:
      The style that defines multigeometry rendering.
    • setStyle

      public void setStyle(GeometryCollectionStyle style)
      Sets the style for this geometry collection.
      Parameters:
      style - The new style that defines defines multigeometry rendering.