Home Reference Source Repository
import TimePeriodControl from './controls/TimePeriodControl.js'
public class | source

TimePeriodControl

Extends:

L.ControlButtonGroupControl → TimePeriodControl

A button group control for switching between different time periods, currently Historic, Seasonal Forecasts, and Climate Projections.

Template: TimePeriodControlTemplate

Constructor Summary

Public Constructor
public

Inherited Summary

From class ButtonGroupControl
public

The name of the currently active button.

public

addTo(map: L.Map): *

Adds the control to the given map.

public

Creates the HTMLElement of the control, registers listeners, and returns it.

Public Constructors

public constructor source

Override:

ButtonGroupControl#constructor

Params:

NameTypeAttributeDescription
options.position string
  • optional
  • default: 'topleft'

The position of the control (one of the map corners). Possible values are 'topleft', 'topright', 'bottomleft' or 'bottomright'.

options.initialActive string
  • optional

If set, the name of the button that is initially active, one of historic, seasonal-forecasts, or climate-projections.