Class HeatmapLayer
- All Implemented Interfaces:
BaseHeatmapLayer.HasBaseHeatmapLayerOptions
,BaseHeatmapLayer.HasBlur
,BaseHeatmapLayer.HasGradient
,BaseHeatmapLayer.HasMaxWeight
,BaseHeatmapLayer.HasRadius
,BaseHeatmapLayer.HasWeightProperty
,HasModifyStyles
,HasBaseLayerOptions
,Serializable
,org.springframework.beans.factory.Aware
,org.springframework.context.ApplicationContextAware
For more details see: Heatmap docs
-
Nested Class Summary
Nested classes/interfaces inherited from class io.jmix.mapsflowui.kit.component.model.layer.BaseHeatmapLayer
BaseHeatmapLayer.HasBaseHeatmapLayerOptions, BaseHeatmapLayer.HasBlur, BaseHeatmapLayer.HasGradient, BaseHeatmapLayer.HasMaxWeight, BaseHeatmapLayer.HasRadius, BaseHeatmapLayer.HasWeightProperty
Nested classes/interfaces inherited from class io.jmix.mapsflowui.kit.component.model.layer.BaseVectorLayer
BaseVectorLayer.HasBackground, BaseVectorLayer.HasBaseVectorLayerOptions, BaseVectorLayer.HasDeclutter, BaseVectorLayer.HasRenderBuffer, BaseVectorLayer.HasUpdateWhileAnimating, BaseVectorLayer.HasUpdateWhileInteracting
Nested classes/interfaces inherited from class io.jmix.mapsflowui.kit.component.model.MapObservableObject
MapObservableObject.ObjectChangeEvent
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.springframework.context.ApplicationContext
Fields inherited from class io.jmix.mapsflowui.kit.component.model.layer.BaseEditableVectorLayer
modifyStyles, selectStyles
Fields inherited from class io.jmix.mapsflowui.kit.component.model.layer.BaseVectorLayer
styles
Fields inherited from class io.jmix.mapsflowui.kit.component.model.MapObservableObject
children, dirty, eventBus, metaProperties, parent, removedChildren, syncId
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addModifyStyles
(FeatureType type, Style... styles) Adds modify styles to a provided feature type.protected HeatmapLayerOptions
getBlur()
getModifyStyles
(FeatureType type) protected HeatmapLayerOptions
<S extends AbstractVectorSource>
Sprotected String
getType()
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
setApplicationContext
(org.springframework.context.ApplicationContext applicationContext) void
Sets the blur size of heat point in pixels.void
setGradient
(List<String> gradient) Sets the color gradient of the heatmap, specified as a list of CSS color strings.void
setMaxWeight
(Double maxWeight) Sets the maximum weight (intensity).void
setModifyStyles
(Map<FeatureType, Collection<Style>> styles) Sets a map of modify styles corresponding to each feature type.void
Sets the radius size of heat point in pixels.void
setSource
(AbstractVectorSource source) Sets source to the layer.void
setWeightProperty
(String weightProperty) Sets weight (intensity) property that is defined in a feature or in an entity.SeesetBlur(Double)
.withClassName
(String className) withExtent
(Extent extent) withGradient
(List<String> gradient) SeesetGradient(List)
.SeeLayer.setId(String)
.withMaxWeight
(Double maxWeight) SeesetMaxWeight(Double)
.withMaxZoom
(Double maxZoom) withMinZoom
(Double minZoom) withModifyStyles
(FeatureType type, Style... styles) withOpacity
(Double opacity) withRadius
(Double radius) SeesetRadius(Double)
.withSource
(AbstractVectorSource source) withVisible
(Boolean visible) withWeightProperty
(String weightProperty) withZIndex
(Integer zIndex) Methods inherited from class io.jmix.mapsflowui.kit.component.model.layer.BaseEditableVectorLayer
addSelectStyles, getModifyStyle, getSelectStyle, getSelectStyles, removeAllSelectStyles, removeAllSelectStyles, removeSelectStyles, setModifyStyles, setSelectStyles, setSelectStyles
Methods inherited from class io.jmix.mapsflowui.kit.component.model.layer.BaseVectorLayer
addStyles, getBackground, getDeclutter, getRenderBuffer, getStyles, getUpdateWhileAnimating, getUpdateWhileInteracting, removeAllStyles, removeStyles, setBackground, setDeclutter, setRenderBuffer, setUpdateWhileAnimating, setUpdateWhileInteracting
Methods inherited from class io.jmix.mapsflowui.kit.component.model.layer.Layer
getClassName, getExtent, getId, getMaxZoom, getMinZoom, getOpacity, getVisible, getZIndex, setClassName, setExtent, setId, setMaxZoom, setMinZoom, setOpacity, setVisible, setZIndex
Methods inherited from class io.jmix.mapsflowui.kit.component.model.MapObservableObject
addChild, addListener, clearRemovedChildren, clearRemovedChildrenInDepth, equals, fireChangeEvent, getChildren, getEventBus, getMetaProperties, getRemovedChildren, getSuperParent, getSyncId, hashCode, isAttachedToMap, isDirty, isDirtyInDepth, markAsDirty, markAsDirtyInDepth, removeChild, setMetaProperty, setParent, unmarkDirtyInDepth
-
Field Details
-
applicationContext
protected org.springframework.context.ApplicationContext applicationContext
-
-
Constructor Details
-
HeatmapLayer
public HeatmapLayer()
-
-
Method Details
-
getType
- Specified by:
getType
in classMapObservableObject
-
createOptions
- Specified by:
createOptions
in classLayer<AbstractVectorSource>
-
getOptions
- Overrides:
getOptions
in classBaseHeatmapLayer
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) - Specified by:
setApplicationContext
in interfaceorg.springframework.context.ApplicationContextAware
-
getGradient
- Specified by:
getGradient
in interfaceBaseHeatmapLayer.HasGradient
- Overrides:
getGradient
in classBaseHeatmapLayer
- Returns:
- list of CSS color strings or
null
if not set
-
setGradient
Description copied from interface:BaseHeatmapLayer.HasGradient
Sets the color gradient of the heatmap, specified as a list of CSS color strings.The default value is
['#00f', '#0ff', '#0f0', '#ff0', '#f00']
.For more details see: setGradient() docs
- Specified by:
setGradient
in interfaceBaseHeatmapLayer.HasGradient
- Overrides:
setGradient
in classBaseHeatmapLayer
- Parameters:
gradient
- list of CSS color strings
-
getRadius
- Specified by:
getRadius
in interfaceBaseHeatmapLayer.HasRadius
- Overrides:
getRadius
in classBaseHeatmapLayer
- Returns:
- radius size in pixels or
null
if not set
-
setRadius
Description copied from interface:BaseHeatmapLayer.HasRadius
Sets the radius size of heat point in pixels. The default value is8
.For more details see: setRadius() docs
- Specified by:
setRadius
in interfaceBaseHeatmapLayer.HasRadius
- Overrides:
setRadius
in classBaseHeatmapLayer
- Parameters:
radius
- radius size in pixels
-
getBlur
- Specified by:
getBlur
in interfaceBaseHeatmapLayer.HasBlur
- Overrides:
getBlur
in classBaseHeatmapLayer
- Returns:
- the blur size in pixels or
null
if not set
-
setBlur
Description copied from interface:BaseHeatmapLayer.HasBlur
Sets the blur size of heat point in pixels. The default value is15
.- Specified by:
setBlur
in interfaceBaseHeatmapLayer.HasBlur
- Overrides:
setBlur
in classBaseHeatmapLayer
- Parameters:
blur
- the blur size in pixels
-
withId
Description copied from class:Layer
SeeLayer.setId(String)
.- Overrides:
withId
in classLayer<AbstractVectorSource>
- Parameters:
id
- id to set ornull
to unset value- Returns:
- current instance
-
getWeightProperty
- Specified by:
getWeightProperty
in interfaceBaseHeatmapLayer.HasWeightProperty
- Overrides:
getWeightProperty
in classBaseHeatmapLayer
- Returns:
- weight property or
null
if not set
-
setWeightProperty
Description copied from interface:BaseHeatmapLayer.HasWeightProperty
Sets weight (intensity) property that is defined in a feature or in an entity. This property must contain values in range[0.0, 1.0]
.- Specified by:
setWeightProperty
in interfaceBaseHeatmapLayer.HasWeightProperty
- Overrides:
setWeightProperty
in classBaseHeatmapLayer
- Parameters:
weightProperty
- property in a feature or in an entity
-
getMaxWeight
- Specified by:
getMaxWeight
in interfaceBaseHeatmapLayer.HasMaxWeight
- Overrides:
getMaxWeight
in classBaseHeatmapLayer
- Returns:
- the maximum weight or
null
if not set
-
setMaxWeight
Description copied from interface:BaseHeatmapLayer.HasMaxWeight
Sets the maximum weight (intensity). If a point contains weight value that is greater than maximum weight, the point value will be cut by the maximum one. The default value is1
.- Specified by:
setMaxWeight
in interfaceBaseHeatmapLayer.HasMaxWeight
- Overrides:
setMaxWeight
in classBaseHeatmapLayer
- Parameters:
maxWeight
- maximum weight
-
getSource
- Specified by:
getSource
in classLayer<AbstractVectorSource>
- Type Parameters:
S
- the source type- Returns:
- the layer source or
null
if not set
-
setSource
Sets source to the layer.For more details see: #setSource docs
Layer supports the following sources:
- Overrides:
setSource
in classLayer<AbstractVectorSource>
- Parameters:
source
- source to set
-
withSource
SeeLayer.setSource(Source)
.Layer supports the following sources:
- Overrides:
withSource
in classLayer<AbstractVectorSource>
- Parameters:
source
- source to set- Returns:
- current instance
-
addModifyStyles
Description copied from interface:HasModifyStyles
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
.- Specified by:
addModifyStyles
in interfaceHasModifyStyles
- Overrides:
addModifyStyles
in classBaseEditableVectorLayer<AbstractVectorSource>
- Parameters:
type
- feature typestyles
- styles to add
-
withModifyStyles
- Parameters:
type
- typestyles
- styles to add- Returns:
- current instance
-
removeModifyStyles
Description copied from interface:HasModifyStyles
Removes modify styles for the provided feature type.- Specified by:
removeModifyStyles
in interfaceHasModifyStyles
- Overrides:
removeModifyStyles
in classBaseEditableVectorLayer<AbstractVectorSource>
- Parameters:
type
- feature typestyles
- styles to remove
-
removeAllModifyStyles
Description copied from interface:HasModifyStyles
Removes all modify styles for the provided feature type.- Specified by:
removeAllModifyStyles
in interfaceHasModifyStyles
- Overrides:
removeAllModifyStyles
in classBaseEditableVectorLayer<AbstractVectorSource>
- Parameters:
type
- feature type
-
removeAllModifyStyles
public void removeAllModifyStyles()Description copied from interface:HasModifyStyles
Removes all modify styles for all feature types.- Specified by:
removeAllModifyStyles
in interfaceHasModifyStyles
- Overrides:
removeAllModifyStyles
in classBaseEditableVectorLayer<AbstractVectorSource>
-
getModifyStyles
- Specified by:
getModifyStyles
in interfaceHasModifyStyles
- Overrides:
getModifyStyles
in classBaseEditableVectorLayer<AbstractVectorSource>
- Returns:
- a map of modify styles corresponding to each feature type
-
setModifyStyles
Description copied from interface:HasModifyStyles
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
.- Specified by:
setModifyStyles
in interfaceHasModifyStyles
- Overrides:
setModifyStyles
in classBaseEditableVectorLayer<AbstractVectorSource>
- Parameters:
styles
- a map of styles
-
getModifyStyles
- Specified by:
getModifyStyles
in interfaceHasModifyStyles
- Parameters:
type
- feature type- Returns:
- collection of modify styles for the provided feature type
-
withWeightProperty
- Parameters:
weightProperty
- property in a feature or in an entity- Returns:
- current instance
-
withMaxWeight
SeesetMaxWeight(Double)
.- Parameters:
maxWeight
- maximum weight- Returns:
- current instance
-
withGradient
SeesetGradient(List)
.- Parameters:
gradient
- list of CSS color strings- Returns:
- current instance
-
withRadius
SeesetRadius(Double)
.- Parameters:
radius
- radius size in pixels- Returns:
- current instance
-
withBlur
SeesetBlur(Double)
.- Parameters:
blur
- the blur size in pixels- Returns:
- current instance
-
withClassName
Description copied from class:Layer
- Overrides:
withClassName
in classLayer<AbstractVectorSource>
- Parameters:
className
- CSS class name- Returns:
- current instance
-
withOpacity
Description copied from class:Layer
- Overrides:
withOpacity
in classLayer<AbstractVectorSource>
- Parameters:
opacity
- opacity of the layer- Returns:
- current instance
-
withVisible
Description copied from class:Layer
- Overrides:
withVisible
in classLayer<AbstractVectorSource>
- Parameters:
visible
- whether layer should be visible- Returns:
- current instance
-
withExtent
Description copied from class:Layer
- Overrides:
withExtent
in classLayer<AbstractVectorSource>
- Parameters:
extent
- extent at which the layer is visible- Returns:
- current instance
-
withZIndex
Description copied from class:Layer
- Overrides:
withZIndex
in classLayer<AbstractVectorSource>
- Parameters:
zIndex
- z-index for layer rendering- Returns:
- current instance
-
withMinZoom
Description copied from class:Layer
- Overrides:
withMinZoom
in classLayer<AbstractVectorSource>
- Parameters:
minZoom
- zoom level (exclusive) above which layer will be visible- Returns:
- current instance
-
withMaxZoom
Description copied from class:Layer
- Overrides:
withMaxZoom
in classLayer<AbstractVectorSource>
- Parameters:
maxZoom
- zoom level (inclusive) at which layer will be visible- Returns:
- current instance
-