Interface HasModifyStyles

All Known Implementing Classes:
HeatmapLayer, VectorLayer

public interface HasModifyStyles
Interface to be implemented by layers that support feature modify styling.
  • Method Details

    • addModifyStyles

      void addModifyStyles(FeatureType type, Style... styles)
      Adds modify styles to a provided feature type.

      Note, modify styles will be applied not to the feature's geometry, but to the generated vertex point of the feature's geometry. This is because the map generates a point for geometry's vertices to enable modification: adding new vertex, change vertex position. So the provided styles should be valid for the point feature.

      To enable modify mode set SupportsFeatureModify.setFeatureModifyEnabled(Boolean) to true.

      Parameters:
      type - feature type
      styles - styles to add
    • getModifyStyles

      Collection<Style> getModifyStyles(FeatureType type)
      Parameters:
      type - feature type
      Returns:
      collection of modify styles for the provided feature type
    • removeModifyStyles

      void removeModifyStyles(FeatureType type, Style... styles)
      Removes modify styles for the provided feature type.
      Parameters:
      type - feature type
      styles - styles to remove
    • removeAllModifyStyles

      void removeAllModifyStyles(FeatureType type)
      Removes all modify styles for the provided feature type.
      Parameters:
      type - feature type
    • removeAllModifyStyles

      void removeAllModifyStyles()
      Removes all modify styles for all feature types.
    • getModifyStyles

      Map<FeatureType,Collection<Style>> getModifyStyles()
      Returns:
      a map of modify styles corresponding to each feature type
    • setModifyStyles

      void setModifyStyles(@Nullable Map<FeatureType,Collection<Style>> styles)
      Sets a map of modify styles corresponding to each feature type. A convenient way to set this map is to use the LayerStylesBuilder. It allows you to build a map with modify styles using a fluent API and configure the creation of default modify styles.

      The provided styles should be valid for the point feature.

      To enable modify mode set SupportsFeatureModify.setFeatureModifyEnabled(Boolean) to true.

      Parameters:
      styles - a map of styles