com.vaadin.flow.component.map.configuration.
Class Configuration
All Implemented Interfaces:
Contains the configuration for the map, such as layers, sources, features.
See Also:
-
Field Summary
Fields inherited from class com.vaadin.flow.component.map.configuration.AbstractConfigurationObject
propertyChangeSupport
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds a layer to the map.
void
For internal use only.
void
collectChanges
(Consumer<AbstractConfigurationObject> changeCollector) For internal use only.
void
For internal use only.
The list of layers managed by this map.
getType()
The unique type name of this class.
getView()
Gets the view of the map.
void
prependLayer
(Layer layer) Adds a layer to the map by prepending it to the list of layers.
void
removeLayer
(Layer layer) Remove a layer from the map
void
Sets the view of the map.
Methods inherited from class com.vaadin.flow.component.map.configuration.AbstractConfigurationObject
addChild, addNullableChild, getId, markAsDirty, notifyChange, notifyChange, removeChild, removePropertyChangeListener, setId, update
-
Constructor Details
-
Configuration
public Configuration()
-
-
Method Details
-
getType
Description copied from class:
AbstractConfigurationObject
The unique type name of this class. Used by the client-side synchronization mechanism to determine which OpenLayers class to synchronize into.
Specified by:
getType
in classAbstractConfigurationObject
-
getLayers
The list of layers managed by this map. This returns an immutable list, meaning the list can not be modified. Instead, use
addLayer(Layer)
andremoveLayer(Layer)
to manage the layers of the list.Returns:
the list of layers managed by this map
-
addLayer
Adds a layer to the map. The layer will be appended to the list of layers, meaning that it will be rendered last / on top of previously added layers by default. For more fine-grained control of the layer rendering order, use
Layer.setzIndex(Integer)
.Parameters:
layer
- the layer to be added -
prependLayer
Adds a layer to the map by prepending it to the list of layers. That means that it will be rendered first / behind all other layers by default. Consider using
Layer.setzIndex(Integer)
for more fine-grained control of the layer rendering order.Parameters:
layer
- the layer to be added -
removeLayer
Remove a layer from the map
Parameters:
layer
- the layer to be removed -
getView
Gets the view of the map. The view gives access to properties like center and zoom level of the viewport.
Returns:
the map's view
-
setView
Sets the view of the map. This is only necessary when dealing with map services that use custom coordinate projection, in which case a view with a matching projection needs to be created and used.
Parameters:
view
- the new view -
deepMarkAsDirty
public void deepMarkAsDirty()For internal use only.
Exposes the method to allow the map component to mark the full configuration hierarchy as changed.
Overrides:
-
addPropertyChangeListener
For internal use only.
Exposes the method to allow the map component to listen for changes to the configuration.
Overrides:
addPropertyChangeListener
in classAbstractConfigurationObject
-
collectChanges
For internal use only.
Exposes the method to allow the map component to collect changes from the configuration.
Overrides:
-