Class Feature
java.lang.Object
io.jmix.mapsflowui.kit.component.model.MapObservableObject
io.jmix.mapsflowui.kit.component.model.feature.Feature
- All Implemented Interfaces:
- Serializable
- Direct Known Subclasses:
- LineStringFeature,- MarkerFeature,- MultiLineStringFeature,- MultiMarkerFeature,- MultiPointFeature,- MultiPolygonFeature,- PointFeature,- PolygonFeature
Abstract class for vector object for geographic features with a geometry.
 
For more details see: Feature docs
- See Also:
- 
Nested Class SummaryNested classes/interfaces inherited from class io.jmix.mapsflowui.kit.component.model.MapObservableObjectMapObservableObject.ObjectChangeEvent
- 
Field SummaryFieldsFields inherited from class io.jmix.mapsflowui.kit.component.model.MapObservableObjectchildren, dirty, eventBus, listener, metaProperties, parent, removedChildren, syncId
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidAdds style to the feature.protected StringgetType()voidRemoves all properties from the feature.voidRemoves all added styles from feature.voidremoveProperty(String name) Removes property from the feature.voidremoveStyles(Style... styles) Removes styles from feature.withProperties(Map<String, Object> properties) Sets the properties that will be associated with the feature.withProperty(String name, Object value) Sets the property that will be associated with the feature.withStyles(Style... styles) SeeaddStyles(Style...).Methods inherited from class io.jmix.mapsflowui.kit.component.model.MapObservableObjectaddChild, addListener, clearRemovedChildren, clearRemovedChildrenInDepth, equals, fireChangeEvent, getChildren, getEventBus, getMetaProperties, getRemovedChildren, getSyncId, hashCode, isDirty, isDirtyInDepth, markAsDirty, markAsDirtyInDepth, removeChild, setMapObjectChangeListener, setMetaProperty, setParent, unmarkDirtyInDepth
- 
Field Details- 
geometry
- 
styles
- 
properties
 
- 
- 
Constructor Details- 
Feature
 
- 
- 
Method Details- 
getType- Specified by:
- getTypein class- MapObservableObject
 
- 
getGeometry- Returns:
- feature's geometry
 
- 
getStyles- Returns:
- list of added styles or empty list if no styles added
 
- 
addStylesAdds style to the feature. Note, if the feature contains custom styles, the default styles or added ones to the layer won't be applied to this feature. And you have to provide fully described style to the specific feature.- Parameters:
- styles- styles to add
 
- 
withStylesSeeaddStyles(Style...).- Parameters:
- styles- styles to add
- Returns:
- current instance
 
- 
removeStylesRemoves styles from feature.- Parameters:
- styles- styles to remove
 
- 
removeAllStylespublic void removeAllStyles()Removes all added styles from feature.
- 
getProperties
- 
withPropertiesSets the properties that will be associated with the feature.For instance, if cluster specified weight property it will try to get it from the feature's properties. The same with heatmap when it is specified its weight property. Another example of using feature's properties is listening click events in source. For instance: vectorSource.addSourceFeatureClickListener(event -> { Feature feature = event.getFeature(); String description = (String) feature.getProperties().get("description"); notifications.show(description); });- Parameters:
- properties- properties to set
- Returns:
- current instance
 
- 
withPropertySets the property that will be associated with the feature.For instance, if cluster specified weight property it will try to get it from the feature's properties. The same with heatmap when it is specified its weight property. Another example of using feature's properties is listening click events in source. For instance: vectorSource.addSourceFeatureClickListener(event -> { Feature feature = event.getFeature(); String description = (String) feature.getProperties().get("description"); notifications.show(description); });- Parameters:
- name- property name
- value- value
- Returns:
- current instance
 
- 
removePropertyRemoves property from the feature.- Parameters:
- name- property name to remove
 
- 
removeAllPropertiespublic void removeAllProperties()Removes all properties from the feature.
 
-