com.vaadin.flow.component.map.configuration.layer.
Class FeatureLayer
All Implemented Interfaces:
Layer that allows to conveniently display a number of geographic features. A
Feature
can be anything that should be displayed on top of a map,
such as points of interest, vehicles or people.
The layer is a high-level abstraction built on top of VectorLayer
,
and uses a VectorSource
by default.
See Also:
-
Field Summary
Fields inherited from class com.vaadin.flow.component.map.configuration.AbstractConfigurationObject
propertyChangeSupport
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addFeature
(Feature feature) Adds a feature to the layer
The features managed by this layer.
The source for this layer.
void
Removes all features from the layer
void
removeFeature
(Feature feature) Removes a feature from the layer
Methods inherited from class com.vaadin.flow.component.map.configuration.layer.VectorLayer
getType, setSource
Methods inherited from class com.vaadin.flow.component.map.configuration.layer.Layer
getBackground, getMaxZoom, getMinZoom, getOpacity, getzIndex, isVisible, setBackground, setMaxZoom, setMinZoom, setOpacity, setVisible, setzIndex
Methods inherited from class com.vaadin.flow.component.map.configuration.AbstractConfigurationObject
addChild, addNullableChild, addPropertyChangeListener, collectChanges, deepMarkAsDirty, getId, markAsDirty, notifyChange, notifyChange, removeChild, removePropertyChangeListener, setId, update
-
Constructor Details
-
FeatureLayer
public FeatureLayer()
-
-
Method Details
-
getSource
The source for this layer. For the feature layer this must always be a
VectorSource
Overrides:
getSource
in classVectorLayer
Returns:
the source of the layer
-
getFeatures
The features managed by this layer. This returns an immutable collection, which means it can not be modified. Use
addFeature(Feature)
andremoveFeature(Feature)
instead.Returns:
the features managed by the layer, immutable
-
addFeature
Adds a feature to the layer
Parameters:
feature
- the feature to be added -
removeFeature
Removes a feature from the layer
Parameters:
feature
- the feature to be removed -
removeAllFeatures
public void removeAllFeatures()Removes all features from the layer
-