com.vaadin.flow.component.map.configuration.source.
Class Source
- java.lang.Object
-
- com.vaadin.flow.component.map.configuration.AbstractConfigurationObject
-
- com.vaadin.flow.component.map.configuration.source.Source
-
All Implemented Interfaces:
Direct Known Subclasses:
public abstract class Source extends AbstractConfigurationObject
Abstract base class for all map sources
See Also:
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
Source.Options
-
Field Summary
-
Fields inherited from class com.vaadin.flow.component.map.configuration.AbstractConfigurationObject
propertyChangeSupport
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
Source(Source.Options options)
-
Method Summary
All Methods Modifier and Type Method Description List<String>
getAttributions()
The attributions to display for the source.
String
getProjection()
The type of coordinate projection to use for this source.
boolean
isAttributionsCollapsible()
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, addPropertyChangeListener, collectChanges, deepMarkAsDirty, getId, getType, markAsDirty, notifyChange, notifyChange, removeChild, removePropertyChangeListener, setId, update
-
-
-
-
Constructor Detail
-
Source
protected Source(Source.Options options)
-
-
Method Detail
-
getAttributions
public List<String> 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
public void setAttributions(List<String> attributions)
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 is
true
.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
public String 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
-
-