Class BaseVectorLayerOptions
- All Implemented Interfaces:
HasBaseLayerOptions
,HasBaseVectorOptions
- Direct Known Subclasses:
VectorLayerOptions
For more details see: BaseVectorLayer docs
- See Also:
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
setBackground
(String color) Sets the background color for the layer.void
setDeclutter
(Boolean declutter) Sets whether declutter images and texts.void
setRenderBuffer
(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.void
setUpdateWhileAnimating
(Boolean updateWhileAnimating) Sets whether feature batches will be recreated during animations.void
setUpdateWhileInteracting
(Boolean updateWhileInteracting) Sets whether feature batches will be recreated during interactions.Methods inherited from class io.jmix.mapsflowui.kit.component.model.layer.option.BaseLayerOptions
getClassName, getExtent, getMaxZoom, getMinZoom, getOpacity, getZIndex, isVisible, setClassName, setExtent, setMaxZoom, setMinZoom, setOpacity, setVisible, setZIndex
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.jmix.mapsflowui.kit.component.model.layer.option.HasBaseLayerOptions
getClassName, getExtent, getMaxZoom, getMinZoom, getOpacity, getZIndex, isVisible, setClassName, setExtent, setMaxZoom, setMinZoom, setOpacity, setVisible, setZIndex
-
Field Details
-
renderBuffer
-
declutter
-
background
-
updateWhileAnimating
-
updateWhileInteracting
-
-
Constructor Details
-
BaseVectorLayerOptions
public BaseVectorLayerOptions()
-
-
Method Details
-
getRenderBuffer
- Specified by:
getRenderBuffer
in interfaceHasBaseVectorOptions
- Returns:
- the render buffer in pixels,
null
value means that default value is used:100
-
setRenderBuffer
Description copied from interface:HasBaseVectorOptions
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. 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:
setRenderBuffer
in interfaceHasBaseVectorOptions
-
isDeclutter
- Specified by:
isDeclutter
in interfaceHasBaseVectorOptions
- Returns:
- whether declutter images and texts,
null
value means that default value is used:false
-
setDeclutter
Description copied from interface:HasBaseVectorOptions
Sets 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
HasBaseLayerOptions.setClassName(String)
are rendered above theFill
andStroke
styles 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:
setDeclutter
in interfaceHasBaseVectorOptions
- Parameters:
declutter
- whether declutter images and texts
-
getBackground
- Specified by:
getBackground
in interfaceHasBaseVectorOptions
- Returns:
- background color for the layer or
null
if not set
-
setBackground
Description copied from interface:HasBaseVectorOptions
Sets 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:
setBackground
in interfaceHasBaseVectorOptions
- Parameters:
color
- color to set
-
isUpdateWhileAnimating
- Specified by:
isUpdateWhileAnimating
in interfaceHasBaseVectorOptions
- Returns:
- whether feature batches will be recreated during animations,
null
value means that default value is used:false
-
setUpdateWhileAnimating
Description copied from interface:HasBaseVectorOptions
Sets 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:
setUpdateWhileAnimating
in interfaceHasBaseVectorOptions
- Parameters:
updateWhileAnimating
- whether feature batches will be recreated during animations
-
getUpdateWhileInteracting
- Specified by:
getUpdateWhileInteracting
in interfaceHasBaseVectorOptions
- Returns:
- whether feature batches will be recreated during interactions,
null
value means that default value is used:false
-
setUpdateWhileInteracting
Description copied from interface:HasBaseVectorOptions
Sets 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:
setUpdateWhileInteracting
in interfaceHasBaseVectorOptions
- Parameters:
updateWhileInteracting
- whether feature batches will be recreated during interactions
-