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
FieldsModifier and TypeFieldDescriptionprotected org.springframework.context.ApplicationContextFields inherited from class io.jmix.mapsflowui.kit.component.model.layer.BaseVectorLayer
stylesFields inherited from class io.jmix.mapsflowui.kit.component.model.MapObservableObject
children, dirty, eventBus, listener, metaProperties, removedChildren, syncId -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdds styles that should be merged with default.protected HasBaseVectorOptions<S extends AbstractVectorSource>
Sprotected StringgetType()voidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext) voidsetSource(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, setUpdateWhileInteractingMethods 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, setZIndexMethods 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, unmarkDirtyInDepthMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods 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:
createOptionsin classLayer<AbstractVectorSource>
-
getType
- Specified by:
getTypein classMapObservableObject
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) - Specified by:
setApplicationContextin interfaceorg.springframework.context.ApplicationContextAware
-
withId
SeeLayer.setId(String).- Overrides:
withIdin classLayer<AbstractVectorSource>- Parameters:
id- id to set ornullto unset value- Returns:
- current instance
-
getSource
- Specified by:
getSourcein classLayer<AbstractVectorSource>- Type Parameters:
S- the source type- Returns:
- the layer source or
nullif not set
-
setSource
Sets source to the layer.For more details see: #setSource docs
The following sources supported:
- Overrides:
setSourcein classLayer<AbstractVectorSource>- Parameters:
source- source to set
-
withSource
- Overrides:
withSourcein classLayer<AbstractVectorSource>- Parameters:
source- source to set- Returns:
- current instance
-
withClassName
- Overrides:
withClassNamein classLayer<AbstractVectorSource>- Parameters:
className- CSS class name- Returns:
- current instance
-
withOpacity
- Overrides:
withOpacityin classLayer<AbstractVectorSource>- Parameters:
opacity- opacity of the layer- Returns:
- current instance
-
withVisible
- Overrides:
withVisiblein classLayer<AbstractVectorSource>- Parameters:
visible- whether layer should be visible- Returns:
- current instance
-
withExtent
- Overrides:
withExtentin classLayer<AbstractVectorSource>- Parameters:
extent- extent at which the layer is visible- Returns:
- current instance
-
withZIndex
- Overrides:
withZIndexin classLayer<AbstractVectorSource>- Parameters:
zIndex- z-index for layer rendering- Returns:
- current instance
-
withMinZoom
- Overrides:
withMinZoomin classLayer<AbstractVectorSource>- Parameters:
minZoom- zoom level (exclusive) above which layer will be visible- Returns:
- current instance
-
withMaxZoom
- Overrides:
withMaxZoomin classLayer<AbstractVectorSource>- Parameters:
maxZoom- zoom level (inclusive) at which layer will be visible- Returns:
- current instance
-
withRenderBuffer
- Overrides:
withRenderBufferin classBaseVectorLayer<AbstractVectorSource>- Parameters:
renderBuffer-- Returns:
- current instance
-
withDeclutter
- Overrides:
withDeclutterin classBaseVectorLayer<AbstractVectorSource>- Parameters:
declutter-- Returns:
- current instance
-
withBackground
- Overrides:
withBackgroundin classBaseVectorLayer<AbstractVectorSource>- Parameters:
color-- Returns:
- current instance
-
withUpdateWhileAnimating
- Overrides:
withUpdateWhileAnimatingin classBaseVectorLayer<AbstractVectorSource>- Parameters:
updateWhileAnimating-- Returns:
-
withUpdateWhileInteracting
- Overrides:
withUpdateWhileInteractingin 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:
addStylesin classBaseVectorLayer<AbstractVectorSource>- Parameters:
styles- styles to add- Returns:
- current instance
-