Class VectorLayer
java.lang.Object
io.jmix.mapsflowui.kit.component.model.MapObservableObject
io.jmix.mapsflowui.kit.component.model.layer.Layer<S>
io.jmix.mapsflowui.kit.component.model.layer.BaseVectorLayer<AbstractVectorSource>
io.jmix.mapsflowui.component.model.layer.VectorLayer
- All Implemented Interfaces:
HasBaseLayerOptions
,HasBaseVectorOptions
,Serializable
,org.springframework.beans.factory.Aware
,org.springframework.context.ApplicationContextAware
public class VectorLayer
extends BaseVectorLayer<AbstractVectorSource>
implements org.springframework.context.ApplicationContextAware
Layer for rendering vector data (e.g. geometries).
For more details see: VectorLayer docs
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class io.jmix.mapsflowui.kit.component.model.MapObservableObject
MapObservableObject.ObjectChangeEvent
-
Field Summary
Modifier and TypeFieldDescriptionprotected org.springframework.context.ApplicationContext
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, listener, metaProperties, removedChildren, syncId
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionAdds styles that should be merged with default.protected HasBaseVectorOptions
<S extends AbstractVectorSource>
Sprotected String
getType()
void
setApplicationContext
(org.springframework.context.ApplicationContext applicationContext) void
setSource
(AbstractVectorSource source) Sets source to the layer.withBackground
(String color) withClassName
(String className) withDeclutter
(Boolean declutter) withExtent
(Extent extent) SeeLayer.setId(String)
.withMaxZoom
(Integer maxZoom) withMinZoom
(Integer minZoom) withOpacity
(Double opacity) withRenderBuffer
(Double renderBuffer) withSource
(AbstractVectorSource source) withUpdateWhileAnimating
(Boolean updateWhileAnimating) withUpdateWhileInteracting
(Boolean updateWhileInteracting) withVisible
(Boolean visible) withZIndex
(Integer zIndex) Methods inherited from class io.jmix.mapsflowui.kit.component.model.layer.BaseVectorLayer
getBackground, getOptions, getRenderBuffer, getStyles, getUpdateWhileInteracting, isDeclutter, isUpdateWhileAnimating, 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, getZIndex, isVisible, 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, getSyncId, hashCode, isDirty, isDirtyInDepth, markAsDirty, markAsDirtyInDepth, removeChild, setMapObjectChangeListener, setMetaProperty, unmarkDirtyInDepth
Methods inherited from class java.lang.Object
clone, finalize, getClass, 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
-
applicationContext
protected org.springframework.context.ApplicationContext applicationContext
-
-
Constructor Details
-
VectorLayer
public VectorLayer()
-
-
Method Details
-
createOptions
- Specified by:
createOptions
in classLayer<AbstractVectorSource>
-
getType
- Specified by:
getType
in classMapObservableObject
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) - Specified by:
setApplicationContext
in interfaceorg.springframework.context.ApplicationContextAware
-
withId
SeeLayer.setId(String)
.- Overrides:
withId
in classLayer<AbstractVectorSource>
- Parameters:
id
- id to set ornull
to unset value- Returns:
- current instance
-
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
The following sources supported:
- Overrides:
setSource
in classLayer<AbstractVectorSource>
- Parameters:
source
- source to set
-
withSource
- Overrides:
withSource
in classLayer<AbstractVectorSource>
- Parameters:
source
- source to set- Returns:
- current instance
-
withClassName
- Overrides:
withClassName
in classLayer<AbstractVectorSource>
- Parameters:
className
- CSS class name- Returns:
- current instance
-
withOpacity
- Overrides:
withOpacity
in classLayer<AbstractVectorSource>
- Parameters:
opacity
- opacity of the layer- Returns:
- current instance
-
withVisible
- Overrides:
withVisible
in classLayer<AbstractVectorSource>
- Parameters:
visible
- whether layer should be visible- Returns:
- current instance
-
withExtent
- Overrides:
withExtent
in classLayer<AbstractVectorSource>
- Parameters:
extent
- extent at which the layer is visible- Returns:
- current instance
-
withZIndex
- Overrides:
withZIndex
in classLayer<AbstractVectorSource>
- Parameters:
zIndex
- z-index for layer rendering- Returns:
- current instance
-
withMinZoom
- Overrides:
withMinZoom
in classLayer<AbstractVectorSource>
- Parameters:
minZoom
- zoom level (exclusive) above which layer will be visible- Returns:
- current instance
-
withMaxZoom
- Overrides:
withMaxZoom
in classLayer<AbstractVectorSource>
- Parameters:
maxZoom
- zoom level (inclusive) at which layer will be visible- Returns:
- current instance
-
withRenderBuffer
- Overrides:
withRenderBuffer
in classBaseVectorLayer<AbstractVectorSource>
- Parameters:
renderBuffer
-- Returns:
- current instance
-
withDeclutter
- Overrides:
withDeclutter
in classBaseVectorLayer<AbstractVectorSource>
- Parameters:
declutter
-- Returns:
- current instance
-
withBackground
- Overrides:
withBackground
in classBaseVectorLayer<AbstractVectorSource>
- Parameters:
color
-- Returns:
- current instance
-
withUpdateWhileAnimating
- Overrides:
withUpdateWhileAnimating
in classBaseVectorLayer<AbstractVectorSource>
- Parameters:
updateWhileAnimating
-- Returns:
-
withUpdateWhileInteracting
- Overrides:
withUpdateWhileInteracting
in classBaseVectorLayer<AbstractVectorSource>
- Parameters:
updateWhileInteracting
-- Returns:
- current instance
-
addStyles
Adds styles that should be merged with default. Layer's styles are applied for all added features, except features with own style.- Overrides:
addStyles
in classBaseVectorLayer<AbstractVectorSource>
- Parameters:
styles
- styles to add- Returns:
- current instance
-