Options
All
  • Public
  • Public/Protected
  • All
Menu

A simple container for information about layer themes

Hierarchy

  • LayerThemesInfo

Index

Constructors

constructor

Properties

activeTheme

activeTheme: LayerTheme

The layer theme that's currently active (if any)

allowDefault

allowDefault: boolean

Indicates whether all layers should be registered as a separate (default) theme

layerThemeChangedEvent

layerThemeChangedEvent: function

This event occurs just after a theme is changed. At this point the theme will have been applied to the map.

Type declaration

layerThemeChangingEvent

layerThemeChangingEvent: function

This event occurs just before a theme is changed. At this point, the active theme property will be set, but the theme will not yet have been applied to the map.

Type declaration

layerThemesConfigured

layerThemesConfigured: boolean

Indicates whether any layer themes have been configured by the essentials administrator or not. The default is false. If false, then all layers will be enabled by default (i.e. standard behaviour)

map

map: Map

The MapInfo object with information about the map to apply the selected layer theme on

previousTheme

previousTheme: LayerTheme

The previous active layer theme (if any)

startupThemeId

startupThemeId: string

The ID of the theme that will be activated upon startup

themeChangeInProgress

themeChangeInProgress: boolean

Indicates whether or not the layer theme is currently in the process of changing. This value should be true in between the layerThemeChangedEvent and layerThemeChangingEvent.

themes

themes: LayerTheme[]

Collection of available layer themes. Will include the default theme if one is configured

Methods

applyTheme

  • applyTheme(id: string): void
  • Applies the theme with the specified ID to the map, and sets the _activeTheme property to reference that theme

    Parameters

    • id: string

    Returns void

getTheme

  • getTheme(themeIdentifier: string, matchAgainstIdAndName?: boolean): LayerTheme
  • Retrieves the theme with the specified id if it exists. Else returns null. If the optional matchAgainstIdAndName parameter is true, it will attempt to match the given string against the theme name (case insensitive) as well as it's id.

    Parameters

    • themeIdentifier: string

      The theme identifier. Could be either the theme id (default) or the theme display name. If it's the display name then matchAgainstIdAndName needs to be set true

    • Optional matchAgainstIdAndName: boolean

      A boolean which, if true, will cause this function to match the identifier against both layer id's and display names.

    Returns LayerTheme