java.lang.Object
com.vaadin.flow.component.map.configuration.AbstractConfigurationObject
com.vaadin.flow.component.map.configuration.source.Source
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
ImageSource, TileSource, VectorSource

public abstract class Source extends AbstractConfigurationObject
Abstract base class for all map sources
See Also:
  • Constructor Details

  • Method Details

    • 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 for OSMSource.

      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 for OSMSource. 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