Interface HasModifyStyles
- All Known Implementing Classes:
HeatmapLayer
,VectorLayer
public interface HasModifyStyles
Interface to be implemented by layers that support feature modify styling.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addModifyStyles
(FeatureType type, Style... styles) Adds modify styles to a provided feature type.getModifyStyles
(FeatureType type) void
Removes all modify styles for all feature types.void
Removes all modify styles for the provided feature type.void
removeModifyStyles
(FeatureType type, Style... styles) Removes modify styles for the provided feature type.void
setModifyStyles
(Map<FeatureType, Collection<Style>> styles) Sets a map of modify styles corresponding to each feature type.
-
Method Details
-
addModifyStyles
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)
totrue
.- Parameters:
type
- feature typestyles
- styles to add
-
getModifyStyles
- Parameters:
type
- feature type- Returns:
- collection of modify styles for the provided feature type
-
removeModifyStyles
Removes modify styles for the provided feature type.- Parameters:
type
- feature typestyles
- styles to remove
-
removeAllModifyStyles
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
Sets a map of modify styles corresponding to each feature type. A convenient way to set this map is to use theLayerStylesBuilder
. 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)
totrue
.- Parameters:
styles
- a map of styles
-