Class VectorLayer
- All Implemented Interfaces:
- BaseVectorLayer.HasBackground,- BaseVectorLayer.HasBaseVectorLayerOptions,- BaseVectorLayer.HasDeclutter,- BaseVectorLayer.HasRenderBuffer,- BaseVectorLayer.HasUpdateWhileAnimating,- BaseVectorLayer.HasUpdateWhileInteracting,- HasStyles,- HasBaseLayerOptions,- Serializable,- org.springframework.beans.factory.Aware,- org.springframework.context.ApplicationContextAware
For more details see: VectorLayer docs
- See Also:
- 
Nested Class SummaryNested classes/interfaces inherited from class io.jmix.mapsflowui.kit.component.model.layer.BaseVectorLayerBaseVectorLayer.HasBackground, BaseVectorLayer.HasBaseVectorLayerOptions, BaseVectorLayer.HasDeclutter, BaseVectorLayer.HasRenderBuffer, BaseVectorLayer.HasUpdateWhileAnimating, BaseVectorLayer.HasUpdateWhileInteractingNested classes/interfaces inherited from class io.jmix.mapsflowui.kit.component.model.MapObservableObjectMapObservableObject.ObjectChangeEvent
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected org.springframework.context.ApplicationContextFields inherited from class io.jmix.mapsflowui.kit.component.model.layer.BaseVectorLayerstylesFields inherited from class io.jmix.mapsflowui.kit.component.model.MapObservableObjectchildren, dirty, eventBus, listener, metaProperties, parent, removedChildren, syncId
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidAdds styles that should be merged with default.protected VectorLayerOptions<S extends AbstractVectorSource>
 Sprotected StringgetType()voidClears list of styles.voidremoveStyles(Style... styles) Removes provided styles from layer.voidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext) voidsetBackground(String color) Sets the background color for the layer.voidsetDeclutter(Boolean declutter) Sets whether declutter images and texts.voidsetRenderBuffer(Double renderBuffer) Sets the buffer in pixels around the viewport extent used by the renderer when getting features from the vector source for the rendering or hit-detection.voidsetSource(AbstractVectorSource source) Sets source to the layer.voidsetUpdateWhileAnimating(Boolean updateWhileAnimating) Sets whether feature batches will be recreated during animations.voidsetUpdateWhileInteracting(Boolean updateWhileInteracting) Sets whether feature batches will be recreated during interactions.withBackground(String color) withClassName(String className) withDeclutter(Boolean declutter) withExtent(Extent extent) SeeLayer.setId(String).withMaxZoom(Double maxZoom) withMinZoom(Double minZoom) withOpacity(Double opacity) withRenderBuffer(Double renderBuffer) withSource(AbstractVectorSource source) withStyles(Style... styles) SeeaddStyles(Style...).withUpdateWhileAnimating(Boolean updateWhileAnimating) withUpdateWhileInteracting(Boolean updateWhileInteracting) withVisible(Boolean visible) withZIndex(Integer zIndex) Methods inherited from class io.jmix.mapsflowui.kit.component.model.layer.BaseVectorLayergetOptionsMethods inherited from class io.jmix.mapsflowui.kit.component.model.layer.LayergetClassName, getExtent, getId, getMaxZoom, getMinZoom, getOpacity, getVisible, getZIndex, setClassName, setExtent, setId, setMaxZoom, setMinZoom, setOpacity, setVisible, setZIndexMethods 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- 
applicationContextprotected org.springframework.context.ApplicationContext applicationContext
 
- 
- 
Constructor Details- 
VectorLayerpublic VectorLayer()
 
- 
- 
Method Details- 
createOptions- Specified by:
- createOptionsin class- Layer<AbstractVectorSource>
 
- 
getType- Specified by:
- getTypein class- MapObservableObject
 
- 
setApplicationContextpublic void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) - Specified by:
- setApplicationContextin interface- org.springframework.context.ApplicationContextAware
 
- 
withIdDescription copied from class:LayerSeeLayer.setId(String).- Overrides:
- withIdin class- Layer<AbstractVectorSource>
- Parameters:
- id- id to set or- nullto unset value
- Returns:
- current instance
 
- 
getSource- Specified by:
- getSourcein class- Layer<AbstractVectorSource>
- Type Parameters:
- S- the source type
- Returns:
- the layer source or nullif not set
 
- 
setSourceSets source to the layer.For more details see: #setSource docs The following sources supported: - Overrides:
- setSourcein class- Layer<AbstractVectorSource>
- Parameters:
- source- source to set
 
- 
withSource- Overrides:
- withSourcein class- Layer<AbstractVectorSource>
- Parameters:
- source- source to set
- Returns:
- current instance
 
- 
getRenderBuffer- Specified by:
- getRenderBufferin interface- BaseVectorLayer.HasRenderBuffer
- Overrides:
- getRenderBufferin class- BaseVectorLayer<AbstractVectorSource>
- Returns:
- the render buffer in pixels, nullvalue means that default value is used:100
 
- 
setRenderBufferDescription copied from interface:BaseVectorLayer.HasRenderBufferSets the buffer in pixels around the viewport extent used by the renderer when getting features from the vector source for the rendering or hit-detection. The hit detection only checks features that are within a certain distance of the given position. For large icons, the actual geometry of a feature might be too far away and is not considered. Recommended value: the size of the largest symbol, line width or label.Note, render buffer is set only at creation time and cannot be changed at runtime. For more details see: BaseVectorLayer docs - Specified by:
- setRenderBufferin interface- BaseVectorLayer.HasRenderBuffer
- Overrides:
- setRenderBufferin class- BaseVectorLayer<AbstractVectorSource>
- Parameters:
- renderBuffer- the buffer in pixels
 
- 
withRenderBuffer- Parameters:
- renderBuffer-
- Returns:
- current instance
 
- 
getDeclutter- Specified by:
- getDeclutterin interface- BaseVectorLayer.HasDeclutter
- Overrides:
- getDeclutterin class- BaseVectorLayer<AbstractVectorSource>
- Returns:
- whether declutter images and texts, nullvalue means that default value is used:false
 
- 
setDeclutterDescription copied from interface:BaseVectorLayer.HasDeclutterSets whether declutter images and texts. Decluttering is applied to all image and text styles of all vector layers that have set this totrue. The priority is defined by the z-index of the layer, theStyle.withZIndex(Integer)of the style and the render order of features. Higher z-index means higher priority. Within the same z-index, a feature rendered before another has higher priority.As an optimization decluttered features from layers with the same Layer.setClassName(String)are rendered above theFillandStrokestyles of all of those layers regardless of z-index. To opt out of this behavior and place declutterd features with their own layer configure the layer with a className other than 'ol-layer'.The default value is false.Note, declutter is set only at creation time and cannot be changed at runtime. For more details see: BaseVectorLayer docs - Specified by:
- setDeclutterin interface- BaseVectorLayer.HasDeclutter
- Overrides:
- setDeclutterin class- BaseVectorLayer<AbstractVectorSource>
- Parameters:
- declutter- whether declutter images and texts
 
- 
withDeclutter- Parameters:
- declutter-
- Returns:
- current instance
 
- 
getBackground- Specified by:
- getBackgroundin interface- BaseVectorLayer.HasBackground
- Overrides:
- getBackgroundin class- BaseVectorLayer<AbstractVectorSource>
- Returns:
- background color for the layer or nullif not set
 
- 
setBackgroundDescription copied from interface:BaseVectorLayer.HasBackgroundSets the background color for the layer. If not specified, no background will be rendered.Note, background color is set only at creation time and cannot be changed at runtime. For more details see: BaseVectorLayer docs - Specified by:
- setBackgroundin interface- BaseVectorLayer.HasBackground
- Overrides:
- setBackgroundin class- BaseVectorLayer<AbstractVectorSource>
- Parameters:
- color- color to set
 
- 
withBackground- Parameters:
- color-
- Returns:
- current instance
 
- 
getUpdateWhileAnimating- Specified by:
- getUpdateWhileAnimatingin interface- BaseVectorLayer.HasUpdateWhileAnimating
- Overrides:
- getUpdateWhileAnimatingin class- BaseVectorLayer<AbstractVectorSource>
- Returns:
- whether feature batches will be recreated during animations, nullvalue means that default value is used:false
 
- 
setUpdateWhileAnimatingDescription copied from interface:BaseVectorLayer.HasUpdateWhileAnimatingSets whether feature batches will be recreated during animations. This means that no vectors will be shown clipped, but the setting will have a performance impact for large amounts of vector data. When set tofalse, batches will be recreated when no animation is active.The default value is false.Note, "updateWhileAnimating" is set only at creation time and cannot be changed at runtime. For more details see: BaseVectorLayer docs - Specified by:
- setUpdateWhileAnimatingin interface- BaseVectorLayer.HasUpdateWhileAnimating
- Overrides:
- setUpdateWhileAnimatingin class- BaseVectorLayer<AbstractVectorSource>
- Parameters:
- updateWhileAnimating- whether feature batches will be recreated during animations
 
- 
withUpdateWhileAnimating- Parameters:
- updateWhileAnimating-
- Returns:
 
- 
getUpdateWhileInteracting- Specified by:
- getUpdateWhileInteractingin interface- BaseVectorLayer.HasUpdateWhileInteracting
- Overrides:
- getUpdateWhileInteractingin class- BaseVectorLayer<AbstractVectorSource>
- Returns:
- whether feature batches will be recreated during interactions, nullvalue means that default value is used:false
 
- 
setUpdateWhileInteractingDescription copied from interface:BaseVectorLayer.HasUpdateWhileInteractingSets whether feature batches will be recreated during interactions. The default value isfalse.For instance, if the user moves map by mouse, the features that were not visible will be drawn after the user releases the pressed mouse. To enable always drawing features, set property to true.Note, "updateWhileInteracting" is set only at creation time and cannot be changed at runtime. For more details see: BaseVectorLayer docs - Specified by:
- setUpdateWhileInteractingin interface- BaseVectorLayer.HasUpdateWhileInteracting
- Overrides:
- setUpdateWhileInteractingin class- BaseVectorLayer<AbstractVectorSource>
- Parameters:
- updateWhileInteracting- whether feature batches will be recreated during interactions
 
- 
withUpdateWhileInteracting- Parameters:
- updateWhileInteracting-
- Returns:
- current instance
 
- 
withClassNameDescription copied from class:Layer- Overrides:
- withClassNamein class- Layer<AbstractVectorSource>
- Parameters:
- className- CSS class name
- Returns:
- current instance
 
- 
withOpacityDescription copied from class:Layer- Overrides:
- withOpacityin class- Layer<AbstractVectorSource>
- Parameters:
- opacity- opacity of the layer
- Returns:
- current instance
 
- 
withVisibleDescription copied from class:Layer- Overrides:
- withVisiblein class- Layer<AbstractVectorSource>
- Parameters:
- visible- whether layer should be visible
- Returns:
- current instance
 
- 
withExtentDescription copied from class:Layer- Overrides:
- withExtentin class- Layer<AbstractVectorSource>
- Parameters:
- extent- extent at which the layer is visible
- Returns:
- current instance
 
- 
withZIndexDescription copied from class:Layer- Overrides:
- withZIndexin class- Layer<AbstractVectorSource>
- Parameters:
- zIndex- z-index for layer rendering
- Returns:
- current instance
 
- 
withMinZoomDescription copied from class:Layer- Overrides:
- withMinZoomin class- Layer<AbstractVectorSource>
- Parameters:
- minZoom- zoom level (exclusive) above which layer will be visible
- Returns:
- current instance
 
- 
withMaxZoomDescription copied from class:Layer- Overrides:
- withMaxZoomin class- Layer<AbstractVectorSource>
- Parameters:
- maxZoom- zoom level (inclusive) at which layer will be visible
- Returns:
- current instance
 
- 
addStylesDescription copied from class:BaseVectorLayerAdds styles that should be merged with default. Layer's styles are applied for all added features, except features with own style.- Specified by:
- addStylesin interface- HasStyles
- Overrides:
- addStylesin class- BaseVectorLayer<AbstractVectorSource>
- Parameters:
- styles- styles to add
 
- 
withStylesSeeaddStyles(Style...).- Parameters:
- styles- styles to add
- Returns:
- current instance
 
- 
getStyles- Specified by:
- getStylesin interface- HasStyles
- Overrides:
- getStylesin class- BaseVectorLayer<AbstractVectorSource>
- Returns:
- layer's styles or empty list
 
- 
removeStylesDescription copied from class:BaseVectorLayerRemoves provided styles from layer.- Specified by:
- removeStylesin interface- HasStyles
- Overrides:
- removeStylesin class- BaseVectorLayer<AbstractVectorSource>
- Parameters:
- styles- styles to remove
 
- 
removeAllStylespublic void removeAllStyles()Description copied from class:BaseVectorLayerClears list of styles.- Specified by:
- removeAllStylesin interface- HasStyles
- Overrides:
- removeAllStylesin class- BaseVectorLayer<AbstractVectorSource>
 
 
-