Class Source
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
ImageSource
,TileSource
,VectorSource
- See Also:
-
Nested Class Summary
-
Field Summary
Fields inherited from class com.vaadin.flow.component.map.configuration.AbstractConfigurationObject
propertyChangeSupport
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionThe attributions to display for the source.The type of coordinate projection to use for this source.boolean
Determines whether attributions are collapsible.void
setAttributions
(List<String> attributions) Sets the attributions to display for the source.Methods inherited from class com.vaadin.flow.component.map.configuration.AbstractConfigurationObject
addChild, addNullableChild, addPropertyChangeListener, collectChanges, deepMarkAsDirty, getId, getType, markAsDirty, notifyChange, notifyChange, removeChild, removePropertyChangeListener, setId, update
-
Constructor Details
-
Source
-
-
Method Details
-
getAttributions
The attributions to display for the source. Attributions can be copyrights and other information that needs to be displayed in order to use map data from a service.This property uses a list to allow displaying a number of attributions. Multiple attributions will be displayed next to each other in the attribution container.
By default, the value is
null
, which means that default attributions will be displayed, if the specific type of source has any. This should only be the case forOSMSource
.- Returns:
- the list of current attributions
-
setAttributions
Sets the attributions to display for the source.Setting this to
null
displays the default attributions, if the specific type of source has any. This should only be the case forOSMSource
. Otherwise, the attributions will be cleared.- Parameters:
attributions
- the new attributions
-
isAttributionsCollapsible
public boolean isAttributionsCollapsible()Determines whether attributions are collapsible. Default istrue
.NOTE: Specific types of sources, such as
OSMSource
, might not allow collapsing the attributions.This value can not be changed after constructing an instance, it can only be set initially by passing an options object to the constructor.
- Returns:
- whether attributions are collapsible
-
getProjection
The type of coordinate projection to use for this source. For example"EPSG:4326"
or"EPSG:3857"
. Default is null, which uses the projection from the view.This value can not be changed after constructing an instance, it can only be set initially by passing an options object to the constructor.
- Returns:
- the custom projection to use, or null
-